Skip to content

Commit 4a72a7a

Browse files
committed
Fix compiling on Windows, and add batch code to unit-test builds.
The act/shield fit code now depends on some batch code, so to make the build work, needed to enable batch build - the proper fix will be to move the shared stuff out of the batch-specific code.
1 parent f44aab6 commit 4a72a7a

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ set(MAX_SPECTRUM_MEMMORY_SIZE_MB 256
172172
# we will compile LibInterSpec as a shared library, so both exes can use it; otherwise
173173
# we will create a static library, and statically link it into our final executable.
174174
# (Electron doesnt need a separate exe for batch)
175-
if( (USE_BATCH_TOOLS AND NOT BUILD_AS_ELECTRON_APP) OR BUILD_AS_OSX_APP )
175+
if( ((USE_BATCH_TOOLS AND NOT BUILD_AS_ELECTRON_APP) OR BUILD_AS_OSX_APP) AND NOT BUILD_AS_UNIT_TEST_SUITE )
176176
set( INTERSPEC_LIB_TYPE SHARED )
177177
else()
178178
set( INTERSPEC_LIB_TYPE STATIC )

InterSpec/ShieldingSourceFitCalc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "InterSpec_config.h"
2727

2828
#include <map>
29+
#include <mutex>
2930
#include <memory>
3031
#include <vector>
3132

target/testing/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ set(PERFORM_DEVELOPER_CHECKS ON CACHE BOOL "")
4545
set(SpecUtils_ENABLE_EQUALITY_CHECKS ON CACHE BOOL "")
4646
set(USE_SPECRUM_FILE_QUERY_WIDGET ON CACHE BOOL "")
4747

48-
# We dont currently export all functions tested when making a DLL for LibInterSpec,
49-
# so we'll disable batch analysis, so a static library will be made.
50-
set(USE_BATCH_TOOLS OFF CACHE INTERNAL "")
48+
set(USE_BATCH_TOOLS ON CACHE INTERNAL "")
5149

5250
set(TEST_SUITE_BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/test_data"
5351
CACHE STRING

0 commit comments

Comments
 (0)