Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set (HAVE_CMAKE true)
# https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -30,11 +30,11 @@ if (PROJECT_IS_TOP_LEVEL)

message ("-- Configuring cmake.h")
configure_file (
${CMAKE_SOURCE_DIR}/cmake.h.in
${CMAKE_SOURCE_DIR}/cmake.h)
${CMAKE_CURRENT_SOURCE_DIR}/cmake.h.in
${CMAKE_CURRENT_SOURCE_DIR}/cmake.h)
endif (PROJECT_IS_TOP_LEVEL)

add_subdirectory (src)
if (EXISTS ${CMAKE_SOURCE_DIR}/test)
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test)
add_subdirectory (test EXCLUDE_FROM_ALL)
endif (EXISTS ${CMAKE_SOURCE_DIR}/test)
endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test)
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.10)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src)
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/..)

set (shared_HEADERS Args.h
Color.h
Expand Down
9 changes: 6 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ if(POLICY CMP0037 AND ${CMAKE_VERSION} VERSION_LESS "3.11.0")
cmake_policy(SET CMP0037 OLD)
endif()

include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/test
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../src
${CMAKE_CURRENT_SOURCE_DIR}/..
${SHARED_INCLUDE_DIRS})

set (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)
Expand All @@ -27,3 +27,6 @@ endforeach (src_FILE)
configure_file(run_all run_all COPYONLY)
configure_file(problems problems COPYONLY)

# Copy config directory structure to build directory for tests
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/config DESTINATION ${CMAKE_BINARY_DIR}/test)