Skip to content

Commit 57519e6

Browse files
committed
Run ./configure if config-host.h doesn't exist.
1 parent dc3537c commit 57519e6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ target_include_directories(
3434
$<INSTALL_INTERFACE:include>)
3535

3636
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
37+
38+
# Run configure to generate config-host.h, if configure hasn't been run
39+
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/config-host.h")
40+
execute_process(
41+
COMMAND "${PROJECT_SOURCE_DIR}/configure"
42+
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
43+
endif()
44+
3745
include(CTest)
3846

3947
# Tests need to be linked against pthreads

0 commit comments

Comments
 (0)