We are currently migrating Bugzilla to GitHub issues. Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them. When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.
in CMakeLists.txt, we have :
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
endif()
in CMake version 3.5-RCx, CMAKE_BINARY_DIR is internally setting ( looks like ) to be the same as CMAKE_SOURCE_DIR. So the above comparison will end up with always TRUE, hence could not build. This happens with all version of CMAKE 3.5 RC. CMake guys recommended not to manually mess up CMAKE_BINAR_DIR, so they have no plan to make it behaves the same as earlier cmake versions.
With some experiments, looks this could be fixed with
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
endif()
CMAKE_CURRENT_SOURCE_DIR & CMAKE_CURRENT_BINARY_DIR approach works for both cmake 3.5 RC versions and also 3.4, 3.3
in CMakeLists.txt, we have : if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there") endif() in CMake version 3.5-RCx, CMAKE_BINARY_DIR is internally setting ( looks like ) to be the same as CMAKE_SOURCE_DIR. So the above comparison will end up with always TRUE, hence could not build. This happens with all version of CMAKE 3.5 RC. CMake guys recommended not to manually mess up CMAKE_BINAR_DIR, so they have no plan to make it behaves the same as earlier cmake versions. With some experiments, looks this could be fixed with if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there") endif() CMAKE_CURRENT_SOURCE_DIR & CMAKE_CURRENT_BINARY_DIR approach works for both cmake 3.5 RC versions and also 3.4, 3.3