Fix to allow build in VS2019

This commit is contained in:
Yue JIN 2020-07-01 15:20:55 +08:00
parent 4ce7df9f54
commit 10889172ce
3 changed files with 15 additions and 1 deletions

6
.gitignore vendored
View file

@ -106,3 +106,9 @@ htmlcov
#Dynamic Library
*.dylib
#Visual Studio CMake Project
/.vs/
CMakeSettings.json
/out/
/openmc/lib/*.lib

View file

@ -325,8 +325,11 @@ else()
add_library(libopenmc SHARED ${libopenmc_SOURCES})
endif()
# Avoid vs error lnk1149 :output filename matches input filename
if(NOT MSVC)
set_target_properties(libopenmc PROPERTIES
OUTPUT_NAME openmc)
OUTPUT_NAME openmc)
endif()
target_include_directories(libopenmc
PUBLIC

View file

@ -386,7 +386,12 @@ void load_custom_source_library()
void close_custom_source_library()
{
#ifdef HAS_DYNAMIC_LINKING
dlclose(custom_source_library);
#else
fatal_error("Custom source libraries have not yet been implemented for "
"non-POSIX systems");
#endif
}
Particle::Bank sample_custom_source_library(uint64_t* seed)