Merge pull request #71 from akva2/fix_sibling_build_thing
fixed: workaround if() bug in cmake
This commit is contained in:
commit
005b2d2df4
@ -98,7 +98,17 @@ macro (find_opm_package module deps header lib defs prog conf)
|
|||||||
# to put the build-directories as siblings to the source trees,
|
# to put the build-directories as siblings to the source trees,
|
||||||
# but with a -build suffix, DUNE likes to have the the build tree
|
# but with a -build suffix, DUNE likes to have the the build tree
|
||||||
# in a "build-cmake" sub-directory of each module
|
# in a "build-cmake" sub-directory of each module
|
||||||
if (NOT (${module}_DIR OR ${module}_ROOT OR ${MODULE}_ROOT))
|
set(workaround_cmake_bug 0)
|
||||||
|
if(${module}_DIR})
|
||||||
|
set(workaround_cmake_bug 1)
|
||||||
|
endif()
|
||||||
|
if(${module}_ROOT})
|
||||||
|
set(workaround_cmake_bug 1)
|
||||||
|
endif()
|
||||||
|
if(${MODULE}_ROOT})
|
||||||
|
set(workaround_cmake_bug 1)
|
||||||
|
endif()
|
||||||
|
if (NOT workaround_cmake_bug)
|
||||||
string (TOLOWER "${module}" _module_lower)
|
string (TOLOWER "${module}" _module_lower)
|
||||||
set (_guess
|
set (_guess
|
||||||
"../${module}"
|
"../${module}"
|
||||||
@ -123,7 +133,7 @@ macro (find_opm_package module deps header lib defs prog conf)
|
|||||||
list (APPEND _guess_bin "${PROJECT_BINARY_DIR}/${_item}")
|
list (APPEND _guess_bin "${PROJECT_BINARY_DIR}/${_item}")
|
||||||
endforeach (_item)
|
endforeach (_item)
|
||||||
set (_no_system "")
|
set (_no_system "")
|
||||||
else (NOT (${module}_DIR OR ${module}_ROOT OR ${MODULE}_ROOT))
|
else ()
|
||||||
# start looking at the paths in this order
|
# start looking at the paths in this order
|
||||||
set (_guess_bin
|
set (_guess_bin
|
||||||
${${module}_DIR}
|
${${module}_DIR}
|
||||||
@ -165,7 +175,7 @@ macro (find_opm_package module deps header lib defs prog conf)
|
|||||||
# is a problem in our own specified directory, we don't necessarily
|
# is a problem in our own specified directory, we don't necessarily
|
||||||
# want an old version that is left in one of the system paths!
|
# want an old version that is left in one of the system paths!
|
||||||
set (_no_system "NO_DEFAULT_PATH")
|
set (_no_system "NO_DEFAULT_PATH")
|
||||||
endif (NOT (${module}_DIR OR ${module}_ROOT OR ${MODULE}_ROOT))
|
endif ()
|
||||||
|
|
||||||
# by specifying _guess in the HINTS section, it gets searched before
|
# by specifying _guess in the HINTS section, it gets searched before
|
||||||
# the system locations as well. the CMake documentation has a cloudy
|
# the system locations as well. the CMake documentation has a cloudy
|
||||||
|
Loading…
Reference in New Issue
Block a user