Skip to content

Commit

Permalink
Use BIN_DIRECTORY in tests as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Aug 27, 2024
1 parent 0b7a1c9 commit db71947
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ ADD_CUSTOM_TARGET(distcheck
ADD_DEPENDENCIES(distcheck dist)
ENDIF(NOT TARGET dist)

if(CMAKE_GENERATOR STREQUAL "Visual Studio 17 2022")
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME OR CMAKE_INSTALL_CONFIG_NAME STREQUAL "")
set(BIN_SUBDIRECTORY "/Release")
else()
set(BIN_SUBDIRECTORY "/${CMAKE_INSTALL_CONFIG_NAME}")
endif()
else()
set(BIN_SUBDIRECTORY "")
endif()

# Checks

ADD_DEFINITIONS("-DHAVE_CONFIG_H")
Expand Down
9 changes: 0 additions & 9 deletions share/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# TODO: add dependencies (c128.s and mega65.s include c64.s)

if(CMAKE_GENERATOR STREQUAL "Visual Studio 17 2022")
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME OR CMAKE_INSTALL_CONFIG_NAME STREQUAL "")
set(BIN_SUBDIRECTORY "/Release")
else()
set(BIN_SUBDIRECTORY "/${CMAKE_INSTALL_CONFIG_NAME}")
endif()
else()
set(BIN_SUBDIRECTORY "")
endif()
set(XLR8 "${CMAKE_BINARY_DIR}/src${BIN_SUBDIRECTORY}/xlr8${CMAKE_EXECUTABLE_SUFFIX}")

file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.s)
Expand Down
4 changes: 2 additions & 2 deletions tests/nihtest.conf.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[settings]
features-files = @CMAKE_BINARY_DIR@/config.h
test-input-directories = @CMAKE_CURRENT_SOURCE_DIR@
program-directories = @CMAKE_CURRENT_BINARY_DIR@
@CMAKE_BINARY_DIR@/src
program-directories = @CMAKE_CURRENT_BINARY_DIR@@BIN_SUBDIRECTORY@
@CMAKE_BINARY_DIR@/src@BIN_SUBDIRECTORY@
default-program = xlr8

[environment]
Expand Down

0 comments on commit db71947

Please sign in to comment.