I'm trying to build some third party libraries from source using Visual Studio 2015. I'm creating the solution file using cmake 3.2.3 and I'm using the ExternalProject_add module. I previously compiled and built this cmake code successfully in 32 bit Visual Studio 2012, but did not in 64 bit.
I'm now trying to build it in 64 bit Visual Studio 2015, and the IDE inexplicably hangs during the build process with both debug and release builds. Sometimes the build processes are still running, such as cl.exe, but nothing advances and I have to go into task manager and end all the processes associated with the build. I then try to build it again, and sometimes it builds successfully while other times it runs into the same error; freezing at different lines in the code depending on how far it got in the build.
I've gotten the same hanging issue when trying to build the solution in 32 bit as well.
I'm not sure if there is an issue with my Visual Studio 2015 installation, or if it is an issue with my cmake code that is causing this hanging. I don't know much about cmake outside of ExternalProject_add, so any and all help with cmake or visual studio is much appreciated.
Here's the external project code that initiates the build:
include(ExternalProject)
ExternalProject_Add(${3rdPartyLibraryName}
DOWNLOAD_DIR ${3rdParty_CacheDir}
URL ${3rdPartyURL}
SOURCE_DIR ${3rdPartySourceDir}
TMP_DIR ${3rdPartySourceDir}/${3rdPartyLibraryName}
BUILD_COMMAND nmake /f makefile.vc MSVC_VER=${MSVC_VERSION} WIN64=YES INCDIR=${CMAKE_SOURCE_DIR}/../3rdParty/${3rdPartyLibraryName}/test/include
BINARY_DIR ${3rdPartySourceDir}
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:string=${3rdPartySourceDir}
INSTALL_COMMAND ""
)
Edit
Additionally, I've tried building this from the command line set up with the VS 2015 environment and have gotten the same hanging issue.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…