File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.10 )
2- set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR } /cmake" )
2+ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR } /cmake" )
33set (HAVE_CMAKE true )
44# https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html
55set (CMAKE_CXX_STANDARD 17)
@@ -30,11 +30,11 @@ if (PROJECT_IS_TOP_LEVEL)
3030
3131 message ("-- Configuring cmake.h" )
3232 configure_file (
33- ${CMAKE_SOURCE_DIR } /cmake.h.in
34- ${CMAKE_SOURCE_DIR } /cmake.h )
33+ ${CMAKE_CURRENT_SOURCE_DIR } /cmake.h.in
34+ ${CMAKE_CURRENT_SOURCE_DIR } /cmake.h )
3535endif (PROJECT_IS_TOP_LEVEL )
3636
3737add_subdirectory (src )
38- if (EXISTS ${CMAKE_SOURCE_DIR } /test )
38+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR } /test )
3939 add_subdirectory (test EXCLUDE_FROM_ALL )
40- endif (EXISTS ${CMAKE_SOURCE_DIR } /test )
40+ endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR } /test )
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.10 )
2- include_directories (${CMAKE_SOURCE_DIR }
3- ${CMAKE_SOURCE_DIR} /src )
2+ include_directories (${CMAKE_CURRENT_SOURCE_DIR }
3+ ${CMAKE_CURRENT_SOURCE_DIR} /.. )
44
55set (shared_HEADERS Args.h
66 Color.h
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ if(POLICY CMP0037 AND ${CMAKE_VERSION} VERSION_LESS "3.11.0")
88 cmake_policy (SET CMP0037 OLD )
99endif ()
1010
11- include_directories (${CMAKE_SOURCE_DIR }
12- ${CMAKE_SOURCE_DIR} /src
13- ${CMAKE_SOURCE_DIR} /test
11+ include_directories (${CMAKE_CURRENT_SOURCE_DIR }
12+ ${CMAKE_CURRENT_SOURCE_DIR} /.. /src
13+ ${CMAKE_CURRENT_SOURCE_DIR} /..
1414 ${SHARED_INCLUDE_DIRS} )
1515
1616set (test_SRCS args.t autocomplete.t charliteral.t composite.t color.t configuration.t dates.t datetime.t duration.t external.t format.t fs.t intrinsic.t json.t json_test lexer.t list.t msg.t negative.t palette.t peg.t pig.t plus.t positive.t question.t rx.t sax_test shared.t star.t stringliteral.t table.t timer.t tree.t unicode.t utf8.t)
@@ -27,3 +27,6 @@ endforeach (src_FILE)
2727configure_file (run_all run_all COPYONLY )
2828configure_file (problems problems COPYONLY )
2929
30+ # Copy config directory structure to build directory for tests
31+ file (COPY ${CMAKE_CURRENT_SOURCE_DIR} /config DESTINATION ${CMAKE_BINARY_DIR} /test )
32+
You can’t perform that action at this time.
0 commit comments