ENH: use the same CMAKE_SKIP_RPATH setting in CHECK_C/CXX_SOURCE_RUNS as in
the main project. I think it doesn't make sense if a project disables RPATH, uses CHECK_C_SOURCE_RUNS() to see if something is able to run, and this succeeds because it has been built with RPATH, but an executable built within the project won't be able to run since it has been built without RPATH. Alex
This commit is contained in:
parent
61aa07b78c
commit
bd8b733d5e
|
@ -37,6 +37,7 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||||
|
-DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
|
||||||
"${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
"${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||||
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||||
COMPILE_OUTPUT_VARIABLE OUTPUT)
|
COMPILE_OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
|
@ -37,6 +37,7 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
|
||||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||||
|
-DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
|
||||||
"${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
|
"${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||||
"${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
|
"${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||||
COMPILE_OUTPUT_VARIABLE OUTPUT)
|
COMPILE_OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
Loading…
Reference in New Issue