Enable dunecontrol to use a build tree as module dir
dunecontrol looks for a dune.module to determine whether a directory contains a module or not. By copying this file to the build tree, we can use (out-of-source!) build trees in dunecontrol too.
This commit is contained in:
parent
89f8068685
commit
5658c8b624
@ -21,3 +21,11 @@ if (CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
|||||||
COMMENT "Patching Makefile to be DUNE compatible"
|
COMMENT "Patching Makefile to be DUNE compatible"
|
||||||
)
|
)
|
||||||
endif (CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
endif (CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
||||||
|
|
||||||
|
# dunecontrol refuses to use a build tree as module directory unless
|
||||||
|
# there is a dune.module in it
|
||||||
|
if (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
||||||
|
execute_process (COMMAND
|
||||||
|
${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/dune.module ${PROJECT_BINARY_DIR}/dune.module
|
||||||
|
)
|
||||||
|
endif (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
||||||
|
@ -39,7 +39,7 @@ macro (opm_dist_clean opm)
|
|||||||
# only remove these files if they were actually copied
|
# only remove these files if they were actually copied
|
||||||
if (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
if (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
||||||
list (APPEND DISTCLEAN_FILES
|
list (APPEND DISTCLEAN_FILES
|
||||||
GNUmakefile
|
dune.module
|
||||||
)
|
)
|
||||||
endif (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
endif (NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
||||||
# script to remove empty directories (can't believe this isn't included!)
|
# script to remove empty directories (can't believe this isn't included!)
|
||||||
|
Loading…
Reference in New Issue
Block a user