From: Martin Quinson Date: Sat, 7 Jan 2023 20:54:21 +0000 (+0100) Subject: Stop trying to build on native WIN32, it's broken anyway X-Git-Tag: v3.34~651 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5ec2b80b686983f84ebab7c7398a29e73286deee Stop trying to build on native WIN32, it's broken anyway --- diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index c0bd725fbb..0000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,74 +0,0 @@ -# This file automatize the testing of SimGrid on Windows using the appveyor.com continuous integration service -# -# Build logs: https://ci.appveyor.com/project/simgrid/simgrid - -# Documentation: https://www.appveyor.com/docs/ -# https://www.appveyor.com/docs/installed-software/ - -image: - - Visual Studio 2019 -# - Ubuntu - -version: "{build}" -clone_depth: 1 - -# scripts that are called at very beginning, before repo cloning -init: -- git config --global core.longpaths true -- git config --global core.autocrlf input - -branches: - only: - - master - - appveyor - -environment: - global: - BOOST_ROOT: C:\Libraries\boost_1_77_0 - -install: -# Strawberry perl is the one to work with gcc; AppVeyor provides ActiveState perl, which is the one to work with visual. -# This package is so outdated and broken that we cannot use it anymore. So we build without perl -# - choco install --limit-output strawberryperl --version 5.20.1.1 -# - SET PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH% -# We need python v3 -- cmd: SET PATH=C:\Python37-x64;%PATH% # We need python v3 -# Ugly hack to ignore versions 3.8 and later of Python -- rename "C:\Python38-x64\python.exe" "python-ignored.exe" -- rename "C:\Python39-x64\python.exe" "python-ignored.exe" -- rename "C:\Python310-x64\python.exe" "python-ignored.exe" -- rename "C:\Python311-x64\python.exe" "python-ignored.exe" -# Use the mingw-w64 provided by Appveyor (must be placed before Perl in the path) -- cmd: SET PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\;%PATH% -# Work around a bug on appveyor where the default sh is not the one I expect -- rename "C:\Program Files\Git\usr\bin\sh.exe" "sh-ignored.exe" -# We need pybind11. SimGrid will pick it automatically if the subdir is here -- cmd: git clone --branch stable --depth=1 https://github.com/pybind/pybind11.git - -before_build: - - cmd: if not exist C:\"Program Files"\Eigen\include\eigen3\Eigen\Core ( - curl -LO https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz && - cmake -E tar zxf eigen-3.4.0.tar.gz && - cd eigen-3.4.0 && - mkdir build && - cd build && - cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\projects .. && - cmake --build . --target install && - cd ..\.. - ) else (echo Using cached Eigen3) - -build_script: -- cmake -G "MinGW Makefiles" -Denable_documentation=OFF -Denable_java=ON -Denable_msg=ON -Denable_smpi=OFF -Denable_mallocators=OFF -Denable_lto=OFF . -- mingw32-make.exe VERBOSE=1 java-all python-bindings # Only the Java and Python parts -- ctest --output-on-failure -R java -- ctest --output-on-failure -R python - -artifacts: -- path: simgrid.jar - name: jarfile - -# IRC notifications, even if https://github.com/appveyor/ci/issues/88 is not closed yet -on_failure: - - "python tools/appveyor-irc-notify.py simgrid [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_red}Failed,Details: {build_url},Commit: {commit_url}" -#on_success: -# - "python tools/appveyor-irc-notify.py simgrid [{project_name}:{branch}] {short_commit}: \"{message}\" ({author}) {color_green}Succeeded,Details: {build_url},Commit: {commit_url}" diff --git a/CMakeLists.txt b/CMakeLists.txt index 10e82d7d3b..583e482268 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ else() set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}.${SIMGRID_VERSION_PATCH}") endif() +if(WIN32 OR MINGW) + message(FATAL "SimGrid does not build on native windows, nor with MinGW. Please use WSL2 instead.") +endif() + message(STATUS "Configuring SimGrid v${release_version}") set(SIMGRID_VERSION_STRING "SimGrid version ${release_version}") @@ -114,9 +118,6 @@ endif() ### SET THE LIBRARY EXTENSION if(APPLE) set(LIB_EXE "dylib") -elseif(WIN32) - set(LIB_EXE "a") - set(BIN_EXE ".exe") else() set(LIB_EXE "so") endif() @@ -173,15 +174,6 @@ if(NOT CMAKE_CROSSCOMPILING AND EXISTS /usr/include/) set(INTERNAL_INCLUDES ${INTERNAL_INCLUDES} /usr/include/) endif() -if(WIN32) - set(CMAKE_INCLUDE_WIN "${CMAKE_C_COMPILER}") - set(CMAKE_LIB_WIN "${CMAKE_C_COMPILER}") - string(REGEX REPLACE "/bin/gcc.*" "/include" CMAKE_INCLUDE_WIN "${CMAKE_INCLUDE_WIN}") - string(REGEX REPLACE "/bin/gcc.*" "/lib" CMAKE_LIB_WIN "${CMAKE_LIB_WIN}") - set(INTERNAL_INCLUDES ${INTERNAL_INCLUDES} ${CMAKE_INCLUDE_WIN}) - unset(CMAKE_INCLUDE_WIN) -endif() - # library dependency cannot start with a space (CMP0004), so initialize it with something that is never deactivated. set(SIMGRID_DEP "-lm") @@ -198,9 +190,7 @@ IF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86|AMD64|amd64") set(SIMGRID_PROCESSOR_i686 0) set(SIMGRID_PROCESSOR_x86_64 1) ENDIF() - if (WIN32) - message(STATUS "Disable fast raw contexts on Windows.") - elseif(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") message(STATUS "Disable fast raw contexts on x32 ABI.") else() set(HAVE_RAW_CONTEXTS 1) @@ -259,10 +249,6 @@ if(enable_msg) set(SIMGRID_HAVE_MSG 1) endif() -if(WIN32) - set(Boost_USE_STATIC_LIBS 1) -endif() - set(HAVE_PAPI 0) if(enable_smpi_papi) include(FindPAPI) @@ -334,10 +320,6 @@ CHECK_INCLUDE_FILE("pthread_np.h" HAVE_PTHREAD_NP_H) # for pthread_setaffinity_n if(CMAKE_SYSTEM_NAME MATCHES "Darwin") set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE") -elseif(MINGW) - # Use the GNU version of unusual modifiers like PRIx64 - add_definitions(-D__USE_MINGW_ANSI_STDIO=1) - set(CMAKE_REQUIRED_DEFINITIONS "-D__USE_MINGW_ANSI_STDIO=1") else() set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") endif() @@ -350,17 +332,14 @@ CHECK_FUNCTION_EXISTS(dlfunc HAVE_DLFUNC) CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP) CHECK_FUNCTION_EXISTS(sysconf HAVE_SYSCONF) +if(NOT HAVE_SYSCONF) + message(FATAL_ERROR "Cannot build without sysconf.") +endif() CHECK_FUNCTION_EXISTS(process_vm_readv HAVE_PROCESS_VM_READV) CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP) CHECK_FUNCTION_EXISTS(mremap HAVE_MREMAP) CHECK_SYMBOL_EXISTS(vasprintf stdio.h HAVE_VASPRINTF) -if(MINGW) - # The detection of vasprintf fails on MinGW, assumingly because it's - # defined as an inline function in stdio.h instead of a regular - # function. So force the result to be 1 despite of the test. - set(HAVE_VASPRINTF 1) -endif() CHECK_INCLUDE_FILE("sys/sendfile.h" HAVE_SENDFILE_H) CHECK_FUNCTION_EXISTS(sendfile HAVE_SENDFILE) @@ -430,12 +409,7 @@ endif() if(enable_smpi) SET(HAVE_SMPI 1) - if(WIN32) - message (STATUS "Warning: no support for SMPI automatic privatization on Windows.") - SET(HAVE_PRIVATIZATION 0) - else() - SET(HAVE_PRIVATIZATION 1) - endif() + SET(HAVE_PRIVATIZATION 1) else() SET(HAVE_SMPI 0) endif() @@ -599,12 +573,10 @@ foreach(script cc cxx ff f90 run) configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpi${script}.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpi${script} @ONLY) endforeach() -if(NOT WIN32) - foreach(script cc cxx ff f90 run) - execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpi${script}) - execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpi${script}) - endforeach() -endif() +foreach(script cc cxx ff f90 run) + execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpi${script}) + execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpi${script}) +endforeach() set(generated_headers_to_install ${CMAKE_CURRENT_BINARY_DIR}/include/smpi/mpif.h @@ -788,11 +760,7 @@ add_dependencies(tests tests-mc) include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MaintainerMode.cmake) ### Make Libs -if(NOT WIN32) - include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeLib.cmake) -else() - include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeLibWin.cmake) -endif() +include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeLib.cmake) if(enable_java) include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Java.cmake) diff --git a/ChangeLog b/ChangeLog index 42bffde8b4..62641f5eb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ SimGrid (3.32.1) not released yet (target december 22) +General: + - On Windows, you now need to install WSL2 as the native builds are now disabled. + It was not really working anyway. + S4U: - Activity::set_remaining() is not public anymore. Use for example Comm::set_payload_size() to change the size of the simulated data. diff --git a/docs/source/Configuring_SimGrid.rst b/docs/source/Configuring_SimGrid.rst index a9bffc588f..9a68fcd47a 100644 --- a/docs/source/Configuring_SimGrid.rst +++ b/docs/source/Configuring_SimGrid.rst @@ -897,9 +897,8 @@ should be the most effcient one (please report bugs if the auto-detection fails for you). They are approximately sorted here from the slowest to the most efficient: - - **thread:** very slow factory using full featured threads (either - pthreads or windows native threads). They are slow but very - standard. Some debuggers or profilers only work with this factory. + - **thread:** very slow factory using full featured threads (pthreads). + They are slow but very standard. Some debuggers or profilers only work with this factory. - **java:** Java applications are virtualized onto java threads (that are regular pthreads registered to the JVM) - **ucontext:** fast factory using System V contexts (Linux and FreeBSD only) @@ -960,7 +959,7 @@ model checker (see :ref:`options_mc_perf`). Disabling Stack Guard Pages ........................... -**Option** ``contexts/guard-size`` **Default** 1 page in most case (0 pages on Windows or with MC) +**Option** ``contexts/guard-size`` **Default** 1 page in most case (0 pages with MC) Unless you use the threads context factory (see :ref:`cfg=contexts/factory`), a stack guard page is usually used diff --git a/docs/source/Doxyfile b/docs/source/Doxyfile index 72b2f58cc2..02cd82d673 100644 --- a/docs/source/Doxyfile +++ b/docs/source/Doxyfile @@ -59,8 +59,6 @@ PREDEFINED += \ SG_END_DECL= \ SIMGRID_REGISTER_PLUGIN(id,desc,init)= \ XBT_PUBLIC= \ - XBT_EXPORT_NO_IMPORT= \ - XBT_IMPORT_NO_EXPORT= \ XBT_PUBLIC_DATA=extern \ XBT_PUBLIC= \ XBT_INLINE= \ diff --git a/docs/source/Installing_SimGrid.rst b/docs/source/Installing_SimGrid.rst index 42b2580ee4..0ee66be77c 100644 --- a/docs/source/Installing_SimGrid.rst +++ b/docs/source/Installing_SimGrid.rst @@ -7,8 +7,7 @@ Installing SimGrid SimGrid should work out of the box on Linux, macOS, FreeBSD, and -Windows (under Windows, you need to install the Windows Subsystem -Linux to get more than the Java bindings). +Windows (with WSL). Pre-compiled Packages --------------------- @@ -435,18 +434,8 @@ Windows-specific instructions The best solution to get SimGrid working on windows is to install the Ubuntu subsystem of Windows 10. All of SimGrid (but the model checker) -works in this setting. - -Native builds not very well supported. Have a look to our `appveypor -configuration file -`_ to -see how we manage to use mingw-64 to build the DLL that the Java file -needs. - -The drawback of MinGW-64 is that the produced DLL are not compatible -with MS Visual C. Some clang-based tools seem promising to fix this, -but this is of rather low priority for us. It it's important for you -and if you get it working, please @ref community_contact "tell us". +works in this setting. Native builds never really worked, and they are +disabled starting with SimGrid v3.33. Python-specific instructions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index 1e4132106e..232d3d1026 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -13,11 +13,8 @@ set(_dht-kademlia_sources dht-kademlia/s4u-dht-kademlia.cpp dht-kademlia/s4u-dht set(_actor-stacksize_factories "^thread") # Threads ignore modifications of the stack size -# The maestro-set example only works for threads and when not using windows. +# The maestro-set example only works for threads set(_maestro-set_factories "thread") -if(WIN32) - set(_maestro-set_disable 1) -endif() if(SIMGRID_HAVE_MC) # These tests timeout with threads, maybe because of dwarf parsing? not sure @@ -258,7 +255,7 @@ foreach (example exec-ptask trace-categories trace-masterworkers trace-platform ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh) endforeach() -if (NOT enable_memcheck AND NOT WIN32) +if (NOT enable_memcheck) ADD_TESH(debug-breakpoint --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/comm-pingpong --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/debug-breakpoint.tesh) diff --git a/examples/smpi/NAS/CMakeLists.txt b/examples/smpi/NAS/CMakeLists.txt index bec59f117d..c654e01c74 100644 --- a/examples/smpi/NAS/CMakeLists.txt +++ b/examples/smpi/NAS/CMakeLists.txt @@ -1,9 +1,5 @@ if(enable_smpi) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") add_executable (is EXCLUDE_FROM_ALL is.c nas_common.c) diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 2d44e8405a..c59d0da051 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -21,15 +21,10 @@ #include #endif -#ifdef _WIN32 -#define MPI_CALL(type, name, args) \ - type name args; \ - type _XBT_CONCAT(P, name) args -#else #define MPI_CALL(type, name, args) \ type name args __attribute__((weak)); \ - type _XBT_CONCAT(P, name) args -#endif + type _XBT_CONCAT(P, name) \ + args SG_BEGIN_DECL #define MPI_THREAD_SINGLE 0 diff --git a/include/xbt/base.h b/include/xbt/base.h index 50cc0edd51..155dfbff30 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -13,19 +13,8 @@ # define _GNU_SOURCE #endif -/* On MinGW, stdio.h defines __MINGW_PRINTF_FORMAT and __MINGW_SCANF_FORMAT - which are the suitable format style (either gnu_printf or ms_printf) - depending on which version is available (__USE_MINGW_ANSI_STDIO): */ -#ifdef __MINGW32__ -# include - -#define XBT_ATTRIB_PRINTF(format_idx, arg_idx) \ - __attribute__((__format__(__MINGW_PRINTF_FORMAT, (format_idx), (arg_idx)))) -#define XBT_ATTRIB_SCANF(format_idx, arg_idx) __attribute__((__MINGW_SCANF_FORMAT(__scanf__, (format_idx), (arg_idx)))) -#else #define XBT_ATTRIB_PRINTF(format_idx, arg_idx) __attribute__((__format__(__printf__, (format_idx), (arg_idx)))) #define XBT_ATTRIB_SCANF(format_idx, arg_idx) __attribute__((__format__(__scanf__, (format_idx), (arg_idx)))) -#endif #if defined(__cplusplus) #if __cplusplus >= 201103L @@ -162,50 +151,15 @@ * * * If you link your application against the DLL or if you do a UNIX build, don't do anything special. This file * will do the right thing for you by default. - * - * Rationale of XBT_EXPORT_NO_IMPORT: (windows-only) - * * Symbols which must be exported in the DLL, but not imported from it. - * - * * This is obviously useful for initialized globals (which cannot be extern or similar). - * * This is also used in the log mechanism where a macro creates the variable automatically. When the macro is - * called from within SimGrid, the symbol must be exported, but when called from within the client code, it must - * not try to retrieve the symbol from the DLL since it's not in there. - * - * Rationale of XBT_IMPORT_NO_EXPORT: (windows-only) - * * Symbols which must be imported from the DLL, but not explicitly exported from it. - * - * * The root log category is already exported, but not imported explicitly when creating a subcategory since we - * cannot import the parent category to deal with the fact that the parent may be in application space, not DLL - * space. */ -/* Build the DLL */ -#if defined(DLL_EXPORT) -# define XBT_PUBLIC __declspec(dllexport) -# define XBT_EXPORT_NO_IMPORT __declspec(dllexport) -# define XBT_IMPORT_NO_EXPORT -# define XBT_PUBLIC_DATA extern __declspec(dllexport) -# define XBT_PRIVATE - -/* Link against the DLL */ -#elif (defined(_WIN32) && !defined(DLL_EXPORT)) -# define XBT_PUBLIC __declspec(dllimport) -# define XBT_EXPORT_NO_IMPORT -# define XBT_IMPORT_NO_EXPORT __declspec(dllimport) -# define XBT_PUBLIC_DATA extern __declspec(dllimport) -# define XBT_PRIVATE - -#elif defined(__ELF__) -# define XBT_PUBLIC __attribute__((visibility("default"))) -# define XBT_EXPORT_NO_IMPORT __attribute__((visibility("default"))) -# define XBT_IMPORT_NO_EXPORT __attribute__((visibility("default"))) +#if defined(__ELF__) +#define XBT_PUBLIC __attribute__((visibility("default"))) # define XBT_PUBLIC_DATA extern __attribute__((visibility("default"))) # define XBT_PRIVATE __attribute__((visibility("hidden"))) #else -# define XBT_PUBLIC /* public */ -# define XBT_EXPORT_NO_IMPORT -# define XBT_IMPORT_NO_EXPORT +#define XBT_PUBLIC /* public */ # define XBT_PUBLIC_DATA extern # define XBT_PRIVATE /** @private */ diff --git a/include/xbt/log.h b/include/xbt/log.h index 7b01d4f30a..30554204e0 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -93,7 +93,7 @@ typedef enum { XBT_LOG_EXTERNAL_CATEGORY(catName); \ (void)_xbt_log_cat_init(&_XBT_LOGV(catName), xbt_log_priority_uninitialized); \ } \ - XBT_EXPORT_NO_IMPORT s_xbt_log_category_t _XBT_LOGV(catName) = { \ + s_xbt_log_category_t _XBT_LOGV(catName) = { \ &_XBT_LOGV(parent), \ NULL /* firstChild */, \ NULL /* nextSibling */, \ diff --git a/src/instr/instr_config.cpp b/src/instr/instr_config.cpp index e70660d211..19d9e9eb22 100644 --- a/src/instr/instr_config.cpp +++ b/src/instr/instr_config.cpp @@ -11,9 +11,6 @@ #include "xbt/xbt_os_time.h" #include -#ifdef WIN32 -#include // _mkdir -#endif #include #include @@ -276,11 +273,7 @@ static void on_container_creation_ti(const Container& c) if (not simgrid::config::get_value("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) { std::string folder_name = simgrid::config::get_value("tracing/filename") + "_files"; std::string filename = folder_name + "/" + std::to_string(prefix) + "_" + c.get_name() + ".txt"; -#ifdef WIN32 - _mkdir(folder_name.c_str()); -#else mkdir(folder_name.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); -#endif ti_unique_file = new std::ofstream(filename.c_str(), std::ofstream::out); xbt_assert(not ti_unique_file->fail(), "Tracefile %s could not be opened for writing", filename.c_str()); tracing_file << filename << '\n'; diff --git a/src/internal_config.h.in b/src/internal_config.h.in index 20ed4761bd..a6dcbd59c4 100644 --- a/src/internal_config.h.in +++ b/src/internal_config.h.in @@ -85,8 +85,6 @@ #cmakedefine01 HAVE_MMAP /* Function mremap */ #cmakedefine01 HAVE_MREMAP -/* Function sysconf */ -#cmakedefine01 HAVE_SYSCONF /* Function vasprintf */ #cmakedefine01 HAVE_VASPRINTF diff --git a/src/kernel/EngineImpl.cpp b/src/kernel/EngineImpl.cpp index 318dd1f3f2..f2914a0ff8 100644 --- a/src/kernel/EngineImpl.cpp +++ b/src/kernel/EngineImpl.cpp @@ -22,9 +22,7 @@ #include "xbt/xbt_modinter.h" /* whether initialization was already done */ #include -#ifndef _WIN32 #include -#endif /* _WIN32 */ #if SIMGRID_HAVE_MC #include "src/mc/remote/AppSide.hpp" @@ -85,7 +83,6 @@ XBT_ATTRIB_NORETURN static void inthandler(int) exit(1); } -#ifndef _WIN32 static void segvhandler(int signum, siginfo_t* siginfo, void* /*context*/) { if ((siginfo->si_signo == SIGSEGV && siginfo->si_code == SEGV_ACCERR) || siginfo->si_signo == SIGBUS) { @@ -156,8 +153,6 @@ static void install_segvhandler() } } -#endif /* _WIN32 */ - namespace simgrid::kernel { EngineImpl::~EngineImpl() @@ -204,10 +199,7 @@ void EngineImpl::initialize(int* argc, char** argv) /* Prepare to display some more info when dying on Ctrl-C pressing */ std::signal(SIGINT, inthandler); - -#ifndef _WIN32 install_segvhandler(); -#endif /* register a function to be called by SURF after the environment creation */ sg_platf_init(); @@ -324,9 +316,6 @@ void EngineImpl::load_platform(const std::string& platf) { double start = xbt_os_time(); if (boost::algorithm::ends_with(platf, ".so") || boost::algorithm::ends_with(platf, ".dylib")) { -#ifdef _WIN32 - xbt_die("loading platform through shared library isn't supported on windows"); -#else void* handle = dlopen(platf.c_str(), RTLD_LAZY); xbt_assert(handle, "Impossible to open platform file: %s", platf.c_str()); platf_handle_ = std::unique_ptr>(handle, dlclose); @@ -335,7 +324,6 @@ void EngineImpl::load_platform(const std::string& platf) const char* dlsym_error = dlerror(); xbt_assert(not dlsym_error, "Error: %s", dlsym_error); callable(*simgrid::s4u::Engine::get_instance()); -#endif /* _WIN32 */ } else { parse_platform_file(platf); } diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index 6b734406f3..bc336be451 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -80,7 +80,6 @@ ContextFactory::~ContextFactory() = default; thread_local Context* Context::current_context_ = nullptr; -#ifndef WIN32 /* Install or disable alternate signal stack, for SIGSEGV handler. */ int Context::install_sigsegv_stack(stack_t* old_stack, bool enable) { @@ -91,7 +90,6 @@ int Context::install_sigsegv_stack(stack_t* old_stack, bool enable) stack.ss_flags = enable ? 0 : SS_DISABLE; return sigaltstack(&stack, old_stack); } -#endif Context* Context::self() { diff --git a/src/kernel/context/Context.hpp b/src/kernel/context/Context.hpp index 3f73ba8ac1..e0a7092c17 100644 --- a/src/kernel/context/Context.hpp +++ b/src/kernel/context/Context.hpp @@ -56,9 +56,7 @@ class XBT_PUBLIC Context { void declare_context(std::size_t size); public: -#ifndef WIN32 static int install_sigsegv_stack(stack_t* old_stack, bool enable); -#endif Context(std::function&& code, actor::ActorImpl* actor, bool maestro); Context(const Context&) = delete; diff --git a/src/kernel/context/ContextRaw.cpp b/src/kernel/context/ContextRaw.cpp index cd523d1477..0cc59ed118 100644 --- a/src/kernel/context/ContextRaw.cpp +++ b/src/kernel/context/ContextRaw.cpp @@ -23,144 +23,132 @@ extern "C" void raw_swapcontext(raw_stack_t* old, raw_stack_t new_context); #if HAVE_RAW_CONTEXTS #if SIMGRID_PROCESSOR_x86_64 -__asm__ ( +__asm__( #if defined(__APPLE__) - ".text\n" - ".globl _raw_makecontext\n" - "_raw_makecontext:\n" -#elif defined(_WIN32) - ".text\n" - ".globl raw_makecontext\n" - "raw_makecontext:\n" + ".text\n" + ".globl _raw_makecontext\n" + "_raw_makecontext:\n" #else - ".text\n" - ".globl raw_makecontext\n" - ".type raw_makecontext,@function\n" - "raw_makecontext:\n"/* Calling convention sets the arguments in rdi, rsi, rdx and rcx, respectively */ + ".text\n" + ".globl raw_makecontext\n" + ".type raw_makecontext,@function\n" + "raw_makecontext:\n" /* Calling convention sets the arguments in rdi, rsi, rdx and rcx, respectively */ #endif - " mov %rdi,%rax\n" /* stack */ - " add %rsi,%rax\n" /* size */ - " andq $-16, %rax\n" /* align stack */ - " movq $0, -8(%rax)\n" /* @return for func */ - " mov %rdx,-16(%rax)\n" /* func */ - " mov %rcx,-24(%rax)\n" /* arg/rdi */ - " movq $0, -32(%rax)\n" /* rsi */ - " movq $0, -40(%rax)\n" /* rdx */ - " movq $0, -48(%rax)\n" /* rcx */ - " movq $0, -56(%rax)\n" /* r8 */ - " movq $0, -64(%rax)\n" /* r9 */ - " movq $0, -72(%rax)\n" /* rbp */ - " movq $0, -80(%rax)\n" /* rbx */ - " movq $0, -88(%rax)\n" /* r12 */ - " movq $0, -96(%rax)\n" /* r13 */ - " movq $0, -104(%rax)\n" /* r14 */ - " movq $0, -112(%rax)\n" /* r15 */ - " sub $112,%rax\n" - " ret\n" -); - -__asm__ ( + " mov %rdi,%rax\n" /* stack */ + " add %rsi,%rax\n" /* size */ + " andq $-16, %rax\n" /* align stack */ + " movq $0, -8(%rax)\n" /* @return for func */ + " mov %rdx,-16(%rax)\n" /* func */ + " mov %rcx,-24(%rax)\n" /* arg/rdi */ + " movq $0, -32(%rax)\n" /* rsi */ + " movq $0, -40(%rax)\n" /* rdx */ + " movq $0, -48(%rax)\n" /* rcx */ + " movq $0, -56(%rax)\n" /* r8 */ + " movq $0, -64(%rax)\n" /* r9 */ + " movq $0, -72(%rax)\n" /* rbp */ + " movq $0, -80(%rax)\n" /* rbx */ + " movq $0, -88(%rax)\n" /* r12 */ + " movq $0, -96(%rax)\n" /* r13 */ + " movq $0, -104(%rax)\n" /* r14 */ + " movq $0, -112(%rax)\n" /* r15 */ + " sub $112,%rax\n" + " ret\n"); + +__asm__( #if defined(__APPLE__) - ".text\n" - ".globl _raw_swapcontext\n" - "_raw_swapcontext:\n" -#elif defined(_WIN32) - ".text\n" - ".globl raw_swapcontext\n" - "raw_swapcontext:\n" + ".text\n" + ".globl _raw_swapcontext\n" + "_raw_swapcontext:\n" #else - ".text\n" - ".globl raw_swapcontext\n" - ".type raw_swapcontext,@function\n" - "raw_swapcontext:\n" /* Calling convention sets the arguments in rdi and rsi, respectively */ + ".text\n" + ".globl raw_swapcontext\n" + ".type raw_swapcontext,@function\n" + "raw_swapcontext:\n" /* Calling convention sets the arguments in rdi and rsi, respectively */ #endif - " push %rdi\n" - " push %rsi\n" - " push %rdx\n" - " push %rcx\n" - " push %r8\n" - " push %r9\n" - " push %rbp\n" - " push %rbx\n" - " push %r12\n" - " push %r13\n" - " push %r14\n" - " push %r15\n" - " mov %rsp,(%rdi)\n" /* old */ - " mov %rsi,%rsp\n" /* new */ - " pop %r15\n" - " pop %r14\n" - " pop %r13\n" - " pop %r12\n" - " pop %rbx\n" - " pop %rbp\n" - " pop %r9\n" - " pop %r8\n" - " pop %rcx\n" - " pop %rdx\n" - " pop %rsi\n" - " pop %rdi\n" - " ret\n" -); + " push %rdi\n" + " push %rsi\n" + " push %rdx\n" + " push %rcx\n" + " push %r8\n" + " push %r9\n" + " push %rbp\n" + " push %rbx\n" + " push %r12\n" + " push %r13\n" + " push %r14\n" + " push %r15\n" + " mov %rsp,(%rdi)\n" /* old */ + " mov %rsi,%rsp\n" /* new */ + " pop %r15\n" + " pop %r14\n" + " pop %r13\n" + " pop %r12\n" + " pop %rbx\n" + " pop %rbp\n" + " pop %r9\n" + " pop %r8\n" + " pop %rcx\n" + " pop %rdx\n" + " pop %rsi\n" + " pop %rdi\n" + " ret\n"); #elif SIMGRID_PROCESSOR_i686 -__asm__ ( -#if defined(__APPLE__) || defined(_WIN32) - ".text\n" - ".globl _raw_makecontext\n" - "_raw_makecontext:\n" +__asm__( +#if defined(__APPLE__) + ".text\n" + ".globl _raw_makecontext\n" + "_raw_makecontext:\n" #else - ".text\n" - ".globl raw_makecontext\n" - ".type raw_makecontext,@function\n" - "raw_makecontext:\n" + ".text\n" + ".globl raw_makecontext\n" + ".type raw_makecontext,@function\n" + "raw_makecontext:\n" #endif - " movl 4(%esp),%eax\n" /* stack */ - " addl 8(%esp),%eax\n" /* size */ - " andl $-16, %eax\n" /* align stack */ - " movl 12(%esp),%ecx\n" /* func */ - " movl 16(%esp),%edx\n" /* arg */ - " movl %edx, -4(%eax)\n" - " movl $0, -8(%eax)\n" /* @return for func */ - " movl %ecx,-12(%eax)\n" - " movl $0, -16(%eax)\n" /* ebp */ - " movl $0, -20(%eax)\n" /* ebx */ - " movl $0, -24(%eax)\n" /* esi */ - " movl $0, -28(%eax)\n" /* edi */ - " subl $28,%eax\n" - " retl\n" -); - -__asm__ ( -#if defined(__APPLE__) || defined(_WIN32) - ".text\n" - ".globl _raw_swapcontext\n" - "_raw_swapcontext:\n" + " movl 4(%esp),%eax\n" /* stack */ + " addl 8(%esp),%eax\n" /* size */ + " andl $-16, %eax\n" /* align stack */ + " movl 12(%esp),%ecx\n" /* func */ + " movl 16(%esp),%edx\n" /* arg */ + " movl %edx, -4(%eax)\n" + " movl $0, -8(%eax)\n" /* @return for func */ + " movl %ecx,-12(%eax)\n" + " movl $0, -16(%eax)\n" /* ebp */ + " movl $0, -20(%eax)\n" /* ebx */ + " movl $0, -24(%eax)\n" /* esi */ + " movl $0, -28(%eax)\n" /* edi */ + " subl $28,%eax\n" + " retl\n"); + +__asm__( +#if defined(__APPLE__) + ".text\n" + ".globl _raw_swapcontext\n" + "_raw_swapcontext:\n" #else - ".text\n" - ".globl raw_swapcontext\n" - ".type raw_swapcontext,@function\n" - "raw_swapcontext:\n" + ".text\n" + ".globl raw_swapcontext\n" + ".type raw_swapcontext,@function\n" + "raw_swapcontext:\n" #endif - // Fetch the parameters: - " movl 4(%esp),%eax\n" /* old (raw_stack_t*) */ - " movl 8(%esp),%edx\n" /* new (raw_stack_t) */ - // Save registers of the current context on the stack: - " pushl %ebp\n" - " pushl %ebx\n" - " pushl %esi\n" - " pushl %edi\n" - // Save the current context (stack pointer) in *old: - " movl %esp,(%eax)\n" - // Switch to the stack of the new context: - " movl %edx,%esp\n" - // Pop the values of the new context: - " popl %edi\n" - " popl %esi\n" - " popl %ebx\n" - " popl %ebp\n" - // Return using the return address of the new context: - " retl\n" -); + // Fetch the parameters: + " movl 4(%esp),%eax\n" /* old (raw_stack_t*) */ + " movl 8(%esp),%edx\n" /* new (raw_stack_t) */ + // Save registers of the current context on the stack: + " pushl %ebp\n" + " pushl %ebx\n" + " pushl %esi\n" + " pushl %edi\n" + // Save the current context (stack pointer) in *old: + " movl %esp,(%eax)\n" + // Switch to the stack of the new context: + " movl %edx,%esp\n" + // Pop the values of the new context: + " popl %edi\n" + " popl %esi\n" + " popl %ebx\n" + " popl %ebp\n" + // Return using the return address of the new context: + " retl\n"); #else #error HAVE_RAW_CONTEXTS defined, but neither SIMGRID_PROCESSOR_x86_64 nor SIMGRID_PROCESSOR_i686. Please update the code. #endif diff --git a/src/kernel/context/ContextSwapped.cpp b/src/kernel/context/ContextSwapped.cpp index 59efe8c4e7..350b686487 100644 --- a/src/kernel/context/ContextSwapped.cpp +++ b/src/kernel/context/ContextSwapped.cpp @@ -15,19 +15,8 @@ #include #include -#include - -#ifdef _WIN32 -#include -#include -#else #include -#endif - -#ifdef __MINGW32__ -#define _aligned_malloc __mingw_aligned_malloc -#define _aligned_free __mingw_aligned_free -#endif /*MINGW*/ +#include #if HAVE_VALGRIND_H #include @@ -99,15 +88,12 @@ SwappedContext::SwappedContext(std::function&& code, actor::ActorImpl* a auto* alloc = static_cast(xbt_malloc0(size + xbt_pagesize)); stack_ = alloc - (reinterpret_cast(alloc) & (xbt_pagesize - 1)) + xbt_pagesize; reinterpret_cast(stack_)[-1] = alloc; -#elif !defined(_WIN32) +#else void* alloc; xbt_assert(posix_memalign(&alloc, xbt_pagesize, size) == 0, "Failed to allocate stack."); this->stack_ = static_cast(alloc); -#else - this->stack_ = static_cast(_aligned_malloc(size, xbt_pagesize)); #endif -#ifndef _WIN32 /* This is fatal. We are going to fail at some point when we try reusing this. */ xbt_assert( mprotect(this->stack_, guard_size, PROT_NONE) != -1, @@ -117,7 +103,7 @@ SwappedContext::SwappedContext(std::function&& code, actor::ActorImpl* a "Please see https://simgrid.org/doc/latest/Configuring_SimGrid.html#configuring-the-user-code-virtualization " "for more information.", strerror(errno)); -#endif + this->stack_ = this->stack_ + guard_size; } else { this->stack_ = static_cast(xbt_malloc0(actor->get_stacksize())); @@ -154,7 +140,6 @@ SwappedContext::~SwappedContext() VALGRIND_STACK_DEREGISTER(valgrind_stack_id_); #endif -#ifndef _WIN32 if (guard_size > 0 && not MC_is_active()) { stack_ = stack_ - guard_size; if (mprotect(stack_, guard_size, PROT_READ | PROT_WRITE) == -1) { @@ -166,7 +151,6 @@ SwappedContext::~SwappedContext() stack_ = reinterpret_cast(stack_)[-1]; #endif } -#endif /* not windows */ xbt_free(stack_); } diff --git a/src/kernel/context/ContextThread.cpp b/src/kernel/context/ContextThread.cpp index cf178298ec..7ed881add0 100644 --- a/src/kernel/context/ContextThread.cpp +++ b/src/kernel/context/ContextThread.cpp @@ -84,9 +84,7 @@ void ThreadContext::wrapper(ThreadContext* context) { Context::set_current(context); -#ifndef WIN32 install_sigsegv_stack(nullptr, true); -#endif // Tell the caller (normally the maestro) we are starting, and wait for its green light context->end_.release(); context->start(); @@ -105,9 +103,7 @@ void ThreadContext::wrapper(ThreadContext* context) // Signal to the caller (normally the maestro) that we have finished: context->yield(); -#ifndef WIN32 install_sigsegv_stack(nullptr, false); -#endif XBT_DEBUG("Terminating"); Context::set_current(nullptr); } diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index 5003e0124b..ae7c449bf6 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -22,11 +22,9 @@ #include #endif -#ifndef _WIN32 #include #include #include -#endif XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)"); diff --git a/src/s4u/s4u_Engine.cpp b/src/s4u/s4u_Engine.cpp index 5d4b7056d9..e808263551 100644 --- a/src/s4u/s4u_Engine.cpp +++ b/src/s4u/s4u_Engine.cpp @@ -495,9 +495,5 @@ double simgrid_get_clock() void simgrid_set_maestro(void (*code)(void*), void* data) { -#ifdef _WIN32 - XBT_WARN("simgrid_set_maestro is believed to not work on windows. Please help us investigating this issue if " - "you need that feature"); -#endif maestro_code = std::bind(code, data); } diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index 5a734d27c3..beafeb5d5f 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -306,7 +306,7 @@ void sg_config_init(int *argc, char **argv) [](int value) { simgrid::kernel::context::stack_size = value * 1024; }}; /* guard size for contexts stacks in memory pages */ -#if defined(_WIN32) || (PTH_STACKGROWTH != -1) +#if (PTH_STACKGROWTH != -1) int default_guard_size = 0; #else int default_guard_size = 1; diff --git a/src/smpi/internals/smpi_bench.cpp b/src/smpi/internals/smpi_bench.cpp index 9c641fb900..520cd14847 100644 --- a/src/smpi/internals/smpi_bench.cpp +++ b/src/smpi/internals/smpi_bench.cpp @@ -18,13 +18,11 @@ #include "xbt/file.hpp" #include "src/smpi/include/smpi_actor.hpp" -#include -#ifndef WIN32 -#include -#endif #include #include +#include +#include #if HAVE_PAPI #include @@ -211,7 +209,7 @@ int smpi_gettimeofday(struct timeval* tv, struct timezone* tz) double secs = trunc(now); double usecs = (now - secs) * 1e6; tv->tv_sec = static_cast(secs); - tv->tv_usec = static_casttv_usec)>(usecs); // suseconds_t (or useconds_t on WIN32) + tv->tv_usec = static_casttv_usec)>(usecs); // suseconds_t } if (smpi_wtime_sleep > 0) simgrid::s4u::this_actor::sleep_for(smpi_wtime_sleep); diff --git a/src/smpi/internals/smpi_memory.cpp b/src/smpi/internals/smpi_memory.cpp index 0f77a57583..b9b81f6bed 100644 --- a/src/smpi/internals/smpi_memory.cpp +++ b/src/smpi/internals/smpi_memory.cpp @@ -3,6 +3,12 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "private.hpp" +#include "src/internal_config.h" +#include "src/smpi/include/smpi_actor.hpp" +#include "src/xbt/memory_map.hpp" +#include "xbt/virtu.h" + #include #include #include @@ -12,19 +18,11 @@ #include #include #include +#include #include #include -#include - -#ifndef WIN32 -#include #include - -#include "private.hpp" -#include "src/internal_config.h" -#include "src/smpi/include/smpi_actor.hpp" -#include "src/xbt/memory_map.hpp" -#include "xbt/virtu.h" +#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_memory, smpi, "Memory layout support for SMPI"); @@ -85,7 +83,6 @@ static void smpi_get_executable_global_size() } xbt_die("Did not find my data segment."); } -#endif #if HAVE_SANITIZER_ADDRESS #include diff --git a/src/smpi/internals/smpi_shared.cpp b/src/smpi/internals/smpi_shared.cpp index a34d6674bd..95067dd211 100644 --- a/src/smpi/internals/smpi_shared.cpp +++ b/src/smpi/internals/smpi_shared.cpp @@ -43,14 +43,11 @@ #include -#include -#ifndef WIN32 -#include -#endif +#include "smpi_utils.hpp" #include +#include #include #include -#include "smpi_utils.hpp" #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON #endif @@ -94,11 +91,9 @@ struct shared_metadata_t { std::map allocs_metadata; std::map> calls; -#ifndef WIN32 int smpi_shared_malloc_bogusfile = -1; int smpi_shared_malloc_bogusfile_huge_page = -1; unsigned long smpi_shared_malloc_blocksize = 1UL << 20; -#endif } void smpi_shared_destroy() @@ -108,7 +103,6 @@ void smpi_shared_destroy() calls.clear(); } -#ifndef WIN32 static void* shm_map(int fd, size_t size, shared_data_key_type* data) { void* mem = smpi_temp_shm_mmap(fd, size); @@ -478,7 +472,6 @@ void smpi_shared_free(void *ptr) xbt_free(ptr); } } -#endif int smpi_shared_known_call(const char* func, const char* input) { diff --git a/src/smpi/smpicc.in b/src/smpi/smpicc.in index b4b24c19be..4379ffea91 100755 --- a/src/smpi/smpicc.in +++ b/src/smpi/smpicc.in @@ -25,10 +25,7 @@ fi list_set CFLAGS @SMPI_C_FLAGS@ list_add LINKARGS -if [ "x@WIN32@" = "x1" ]; then - list_add CFLAGS "-include" "@includedir@/smpi/smpi_main.h" - list_add LINKARGS "@libdir@\libsimgrid.dll" -elif [ "x@APPLE@" = "x1" ]; then +if [ "x@APPLE@" = "x1" ]; then if [ "x${SMPI_PRETEND_CC}" = "x" ]; then list_add CFLAGS "-include" "@includedir@/smpi/smpi_helpers.h" list_add LINKARGS "-shared" @@ -91,9 +88,7 @@ while [ $# -gt 0 ]; do esac done -if [ "x@WIN32@" != "x1" ]; then - list_add CMDARGS "-fPIC" -fi +list_add CMDARGS "-fPIC" list_set CMDLINE "${CC}" list_add_not_empty CMDLINE "${CFLAGS}" diff --git a/src/smpi/smpicxx.in b/src/smpi/smpicxx.in index 3a5b929d95..59c4eee3a9 100755 --- a/src/smpi/smpicxx.in +++ b/src/smpi/smpicxx.in @@ -25,10 +25,7 @@ else LINKER_UNDEFINED_ERROR="1" fi -if [ "x@WIN32@" = "x1" ]; then - list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_main.h" - list_add LINKARGS "@libdir@\libsimgrid.dll" -elif [ "x@APPLE@" = "x1" ]; then +if [ "x@APPLE@" = "x1" ]; then if [ "x${SMPI_PRETEND_CC}" = "x" ]; then list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_helpers.h" list_add LINKARGS "-shared" @@ -88,9 +85,7 @@ while [ $# -gt 0 ]; do esac done -if [ "x@WIN32@" != "x1" ]; then - list_add CMDARGS "-fPIC" -fi +list_add CMDARGS "-fPIC" list_set CMDLINE "${CXX}" list_add_not_empty CMDLINE "${CXXFLAGS}" diff --git a/src/sthread/sthread_impl.cpp b/src/sthread/sthread_impl.cpp index 30e9a2a98a..c4aa27d0c8 100644 --- a/src/sthread/sthread_impl.cpp +++ b/src/sthread/sthread_impl.cpp @@ -154,7 +154,7 @@ int sthread_gettimeofday(struct timeval* tv) double secs = trunc(now); double usecs = (now - secs) * 1e6; tv->tv_sec = static_cast(secs); - tv->tv_usec = static_casttv_usec)>(usecs); // suseconds_t (or useconds_t on WIN32) + tv->tv_usec = static_casttv_usec)>(usecs); // suseconds_t } return 0; } diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 9349d6664a..77046196b4 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -16,10 +16,6 @@ #include #include -#ifdef _WIN32 -#include -#endif - XBT_LOG_NEW_CATEGORY(surf, "All SURF categories"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_kernel, surf, "Logging specific to SURF (kernel)"); @@ -95,18 +91,7 @@ const std::vector surf_optimization_mode_description = /* returns whether #file_path is an absolute file path. Surprising, isn't it ? */ static bool is_absolute_file_path(const std::string& file_path) { -#ifdef _WIN32 - WIN32_FIND_DATA wfd = {0}; - HANDLE hFile = FindFirstFile(file_path.c_str(), &wfd); - - if (INVALID_HANDLE_VALUE == hFile) - return false; - - FindClose(hFile); - return true; -#else return (file_path.c_str()[0] == '/'); -#endif } std::ifstream* surf_ifsopen(const std::string& name) diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index 3b6b613e6c..bed3b1c177 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -29,7 +29,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support"); -XBT_EXPORT_NO_IMPORT xbt_cfg_t simgrid_config = nullptr; +xbt_cfg_t simgrid_config = nullptr; namespace simgrid::config { diff --git a/src/xbt/xbt_main.cpp b/src/xbt/xbt_main.cpp index 15d3e9c7af..7825a35936 100644 --- a/src/xbt/xbt_main.cpp +++ b/src/xbt/xbt_main.cpp @@ -23,9 +23,6 @@ #include #include -#ifdef _WIN32 -# include /* To silence MSVC on abort() */ -#endif #if HAVE_UNISTD_H # include #endif @@ -63,46 +60,11 @@ void sthread_disable() { // when libsthread is LD_PRELOADED. In this case, sthread's implem gets used instead. } -#ifdef _WIN32 -#include - -#ifndef __GNUC__ -/* Should not be necessary but for some reason, DllMain is called twice at attachment and at detachment.*/ -/* see also http://msdn.microsoft.com/en-us/library/ms682583%28VS.85%29.aspx */ -/* and http://www.microsoft.com/whdc/driver/kernel/DLL_bestprac.mspx */ -static BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - static bool xbt_dll_process_is_attached = false; - if (fdwReason == DLL_PROCESS_ATTACH && not xbt_dll_process_is_attached) { - xbt_dll_process_is_attached = true; - xbt_preinit(); - } else if (fdwReason == DLL_PROCESS_DETACH && xbt_dll_process_is_attached) { - xbt_dll_process_is_attached = false; - } - return 1; -} -#endif - -#endif - static void xbt_preinit() { -#ifdef _WIN32 - SYSTEM_INFO si; - GetSystemInfo(&si); - xbt_pagesize = si.dwPageSize; -#elif HAVE_SYSCONF xbt_pagesize = static_cast(sysconf(_SC_PAGESIZE)); -#else -# error Cannot get page size. -#endif - xbt_pagebits = static_cast(log2(xbt_pagesize)); -#ifdef _TWO_DIGIT_EXPONENT - /* Even printf behaves differently on Windows... */ - _set_output_format(_TWO_DIGIT_EXPONENT); -#endif xbt_log_preinit(); xbt_dict_preinit(); atexit(xbt_postexit); @@ -154,12 +116,6 @@ void xbt_abort() { /* Call __gcov_flush on abort when compiling with coverage options. */ coverage_checkpoint(); -#ifdef _WIN32 - /* We said *in silence*. We don't want to see the error message printed by Microsoft's implementation of abort(). */ - raise(SIGABRT); - signal(SIGABRT, SIG_DFL); - raise(SIGABRT); -#endif abort(); } diff --git a/src/xbt/xbt_os_file.cpp b/src/xbt/xbt_os_file.cpp index 1b424e122c..2786b5dfbe 100644 --- a/src/xbt/xbt_os_file.cpp +++ b/src/xbt/xbt_os_file.cpp @@ -9,10 +9,6 @@ #include "xbt/asserts.h" #include "xbt/file.hpp" /* this module */ -#ifdef _WIN32 -#include -#endif - #if HAVE_UNISTD_H #include #include diff --git a/src/xbt/xbt_os_time.c b/src/xbt/xbt_os_time.c index f35503ea14..b6a16ad27f 100644 --- a/src/xbt/xbt_os_time.c +++ b/src/xbt/xbt_os_time.c @@ -13,12 +13,7 @@ #include #include -#ifdef _WIN32 -#include -#include -#else #include -#endif //Freebsd doesn't provide this clock_gettime flag yet, because it was added too recently (after 1993) #if defined (CLOCK_PROF) && ! defined (CLOCK_PROCESS_CPUTIME_ID) @@ -40,43 +35,12 @@ #include #endif -#ifdef _WIN32 -static void w32_time_to_timeval(struct timeval* tv, const FILETIME* ft) -{ - unsigned __int64 tm; - tm = (unsigned __int64)ft->dwHighDateTime << 32; - tm |= ft->dwLowDateTime; - tm /= 10; - tm -= 11644473600000000ULL; - tv->tv_sec = (long)(tm / 1000000L); - tv->tv_usec = (long)(tm % 1000000L); -} - -static void w32_times_to_timeval(struct timeval* tv, const FILETIME* kernel_time, const FILETIME* user_time) -{ - unsigned __int64 ktm, utm; - ktm = (unsigned __int64)kernel_time->dwHighDateTime << 32; - ktm |= kernel_time->dwLowDateTime; - ktm /= 10; - utm = (unsigned __int64)user_time->dwHighDateTime << 32; - utm |= user_time->dwLowDateTime; - utm /= 10; - tv->tv_sec = (long)(ktm / 1000000L) + (long)(utm / 1000000L); - tv->tv_usec = (long)(ktm % 1000000L) + (long)(utm % 1000000L); -} -#endif - double xbt_os_time(void) { #if HAVE_GETTIMEOFDAY struct timeval tv; gettimeofday(&tv, NULL); -#elif defined(_WIN32) - struct timeval tv; - FILETIME ft; - GetSystemTimeAsFileTime(&ft); - w32_time_to_timeval(&tv, &ft); -#else /* not windows, no gettimeofday => poor resolution */ +#else /* no gettimeofday => poor resolution */ return (double) (time(NULL)); #endif /* HAVE_GETTIMEOFDAY? */ @@ -86,10 +50,7 @@ double xbt_os_time(void) void xbt_os_sleep(double sec) { -#ifdef _WIN32 - Sleep((floor(sec) * 1000) + ((sec - floor(sec)) * 1000)); - -#elif HAVE_NANOSLEEP +#if HAVE_NANOSLEEP struct timespec ts; ts.tv_sec = (time_t)sec; ts.tv_nsec = (long)((sec - floor(sec)) * 1e9); @@ -114,7 +75,7 @@ struct s_xbt_os_timer { struct timespec start; struct timespec stop; struct timespec elapse; -#elif HAVE_GETTIMEOFDAY || defined(_WIN32) +#elif HAVE_GETTIMEOFDAY struct timeval start; struct timeval stop; struct timeval elapse; @@ -145,7 +106,7 @@ double xbt_os_timer_elapsed(const_xbt_os_timer_t timer) #if HAVE_POSIX_GETTIME && defined (_POSIX_THREAD_CPUTIME) return ((double) timer->stop.tv_sec) - ((double) timer->start.tv_sec) + ((double) timer->elapse.tv_sec ) + ((((double) timer->stop.tv_nsec) - ((double) timer->start.tv_nsec) + ((double) timer->elapse.tv_nsec )) / 1e9); -#elif HAVE_GETTIMEOFDAY || defined(_WIN32) +#elif HAVE_GETTIMEOFDAY return ((double) timer->stop.tv_sec) - ((double) timer->start.tv_sec) + ((double) timer->elapse.tv_sec ) + ((((double) timer->stop.tv_usec) - ((double) timer->start.tv_usec) + ((double) timer->elapse.tv_usec )) / 1000000.0); @@ -164,12 +125,6 @@ void xbt_os_walltimer_start(xbt_os_timer_t timer) timer->elapse.tv_sec = 0; timer->elapse.tv_usec = 0; gettimeofday(&(timer->start), NULL); -#elif defined(_WIN32) - timer->elapse.tv_sec = 0; - timer->elapse.tv_usec = 0; - FILETIME ft; - GetSystemTimeAsFileTime(&ft); - w32_time_to_timeval(&timer->start, &ft); #else timer->elapse = 0; timer->start = (unsigned long int) (time(NULL)); @@ -187,12 +142,6 @@ void xbt_os_walltimer_resume(xbt_os_timer_t timer) timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec; gettimeofday(&(timer->start), NULL); -#elif defined(_WIN32) - timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; - timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec; - FILETIME ft; - GetSystemTimeAsFileTime(&ft); - w32_time_to_timeval(&timer->start, &ft); #else timer->elapse = timer->stop - timer->start; timer->start = (unsigned long int) (time(NULL)); @@ -205,10 +154,6 @@ void xbt_os_walltimer_stop(xbt_os_timer_t timer) clock_gettime(CLOCK_REALTIME, &(timer->stop)); #elif HAVE_GETTIMEOFDAY gettimeofday(&(timer->stop), NULL); -#elif defined(_WIN32) - FILETIME ft; - GetSystemTimeAsFileTime(&ft); - w32_time_to_timeval(&timer->stop, &ft); #else timer->stop = (unsigned long int) (time(NULL)); #endif @@ -224,13 +169,6 @@ void xbt_os_cputimer_start(xbt_os_timer_t timer) timer->elapse.tv_sec = 0; timer->elapse.tv_usec = 0; gettimeofday(&(timer->start), NULL); -#elif defined(_WIN32) - timer->elapse.tv_sec = 0; - timer->elapse.tv_usec = 0; - HANDLE h = GetCurrentProcess(); - FILETIME creationTime, exitTime, kernelTime, userTime; - GetProcessTimes(h, &creationTime, &exitTime, &kernelTime, &userTime); - w32_times_to_timeval(&timer->start, &kernelTime, &userTime); #else # error The cpu timers of SimGrid do not seem to work on your platform. #endif @@ -246,13 +184,6 @@ void xbt_os_cputimer_resume(xbt_os_timer_t timer) timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec; gettimeofday(&(timer->start), NULL); -#elif defined(_WIN32) - timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; - timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec; - HANDLE h = GetCurrentProcess(); - FILETIME creationTime, exitTime, kernelTime, userTime; - GetProcessTimes(h, &creationTime, &exitTime, &kernelTime, &userTime); - w32_times_to_timeval(&timer->start, &kernelTime, &userTime); #else # error The cpu timers of SimGrid do not seem to work on your platform. #endif @@ -264,11 +195,6 @@ void xbt_os_cputimer_stop(xbt_os_timer_t timer) clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &(timer->stop)); #elif HAVE_GETTIMEOFDAY gettimeofday(&(timer->stop), NULL); -#elif defined(_WIN32) - HANDLE h = GetCurrentProcess(); - FILETIME creationTime, exitTime, kernelTime, userTime; - GetProcessTimes(h, &creationTime, &exitTime, &kernelTime, &userTime); - w32_times_to_timeval(&timer->stop, &kernelTime, &userTime); #else # error The cpu timers of SimGrid do not seem to work on your platform. #endif @@ -293,11 +219,6 @@ void xbt_os_threadtimer_start(xbt_os_timer_t timer) timer->elapse.tv_sec = 0; timer->elapse.tv_usec = 0; gettimeofday(&(timer->start), NULL); -#elif defined(_WIN32) - HANDLE h = GetCurrentThread(); - FILETIME creationTime, exitTime, kernelTime, userTime; - GetThreadTimes(h, &creationTime, &exitTime, &kernelTime, &userTime); - w32_times_to_timeval(&timer->start, &kernelTime, &userTime); #else # error The thread timers of SimGrid do not seem to work on your platform. #endif @@ -322,13 +243,6 @@ void xbt_os_threadtimer_resume(xbt_os_timer_t timer) timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec; gettimeofday(&(timer->start), NULL); -#elif defined(_WIN32) - timer->elapse.tv_sec += timer->stop.tv_sec - timer->start.tv_sec; - timer->elapse.tv_usec += timer->stop.tv_usec - timer->start.tv_usec; - HANDLE h = GetCurrentThread(); - FILETIME creationTime, exitTime, kernelTime, userTime; - GetThreadTimes(h, &creationTime, &exitTime, &kernelTime, &userTime); - w32_times_to_timeval(&timer->start, &kernelTime, &userTime); #else # error The thread timers of SimGrid do not seem to work on your platform. #endif @@ -347,11 +261,6 @@ void xbt_os_threadtimer_stop(xbt_os_timer_t timer) timer->stop.tv_sec = thi->system_time.seconds + thi->user_time.seconds; #elif HAVE_GETTIMEOFDAY //if nothing else is available, return just time gettimeofday(&(timer->stop), NULL); -#elif defined(_WIN32) - HANDLE h = GetCurrentThread(); - FILETIME creationTime, exitTime, kernelTime, userTime; - GetThreadTimes(h, &creationTime, &exitTime, &kernelTime, &userTime); - w32_times_to_timeval(&timer->stop, &kernelTime, &userTime); #else # error The thread timers of SimGrid do not seem to work on your platform. #endif diff --git a/teshsuite/kernel/CMakeLists.txt b/teshsuite/kernel/CMakeLists.txt index 476ee32fb7..a68c200178 100644 --- a/teshsuite/kernel/CMakeLists.txt +++ b/teshsuite/kernel/CMakeLists.txt @@ -12,9 +12,6 @@ endforeach() set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/stack-overflow/stack-overflow.tesh) if (NOT enable_memcheck AND NOT enable_address_sanitizer AND NOT enable_thread_sanitizer) ADD_TESH_FACTORIES(stack-overflow "^thread" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/kernel/stack-overflow --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/kernel/stack-overflow stack-overflow.tesh) - if (WIN32) - SET_TESH_PROPERTIES(stack-overflow "^thread" WILL_FAIL true) - endif() endif() ## Add the tests for context-default diff --git a/teshsuite/platforms/CMakeLists.txt b/teshsuite/platforms/CMakeLists.txt index f239bbf759..b1483ff941 100644 --- a/teshsuite/platforms/CMakeLists.txt +++ b/teshsuite/platforms/CMakeLists.txt @@ -47,10 +47,4 @@ if(enable_debug) # these tests need assertions ADD_TESH(tesh-parser-bogus-symmetric --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/bogus_two_hosts_asymetric.tesh) ADD_TESH(tesh-parser-bogus-missing-gw --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/platforms --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/bogus_missing_gateway.tesh) - - #These tests fail on Windows as the signal returned is not the same as Unix would send. - if(WIN32) - set_property(TEST tesh-parser-bogus-symmetric PROPERTY WILL_FAIL TRUE) - set_property(TEST tesh-parser-bogus-missing-gw PROPERTY WILL_FAIL TRUE) - endif() endif() diff --git a/teshsuite/smpi/CMakeLists.txt b/teshsuite/smpi/CMakeLists.txt index 8edee11924..be774532ff 100644 --- a/teshsuite/smpi/CMakeLists.txt +++ b/teshsuite/smpi/CMakeLists.txt @@ -1,9 +1,5 @@ if(enable_smpi) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") foreach(x coll-allgather coll-allgatherv coll-allreduce coll-allreduce-with-leaks coll-alltoall coll-alltoallv coll-barrier coll-bcast @@ -16,14 +12,12 @@ if(enable_smpi) add_dependencies(tests ${x}) endforeach() - if(NOT WIN32) - foreach(x macro-shared auto-shared macro-partial-shared macro-partial-shared-communication ) - add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.c) - target_link_libraries(${x} simgrid) - set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) - add_dependencies(tests ${x}) - endforeach() - endif() + foreach(x macro-shared auto-shared macro-partial-shared macro-partial-shared-communication ) + add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.c) + target_link_libraries(${x} simgrid) + set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) + add_dependencies(tests ${x}) + endforeach() if(enable_smpi AND SMPI_FORTRAN) set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") @@ -63,12 +57,10 @@ set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/hostfile if(enable_smpi) - if(NOT WIN32) - ADD_TESH_FACTORIES(tesh-smpi-macro-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-shared/macro-shared.tesh) - ADD_TESH_FACTORIES(tesh-smpi-auto-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/auto-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/auto-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/auto-shared/auto-shared.tesh) - ADD_TESH_FACTORIES(tesh-smpi-macro-partial-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-partial-shared/macro-partial-shared.tesh) - ADD_TESH_FACTORIES(tesh-smpi-macro-partial-shared-communication "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared-communication --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared-communication ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-partial-shared-communication/macro-partial-shared-communication.tesh) - endif() + ADD_TESH_FACTORIES(tesh-smpi-macro-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-shared/macro-shared.tesh) + ADD_TESH_FACTORIES(tesh-smpi-auto-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/auto-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/auto-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/auto-shared/auto-shared.tesh) + ADD_TESH_FACTORIES(tesh-smpi-macro-partial-shared "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-partial-shared/macro-partial-shared.tesh) + ADD_TESH_FACTORIES(tesh-smpi-macro-partial-shared-communication "*" --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared-communication --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi/macro-partial-shared-communication ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/macro-partial-shared-communication/macro-partial-shared-communication.tesh) foreach(x coll-allgather coll-allgatherv coll-allreduce coll-alltoall coll-alltoallv coll-barrier coll-bcast coll-gather coll-reduce coll-reduce-scatter coll-scatter macro-sample pt2pt-dsend pt2pt-pingpong diff --git a/teshsuite/smpi/mpich3-test/CMakeLists.txt b/teshsuite/smpi/mpich3-test/CMakeLists.txt index faa130bc10..f355696cdb 100644 --- a/teshsuite/smpi/mpich3-test/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/CMakeLists.txt @@ -33,11 +33,7 @@ set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/README #build only once files used in each test (C version compiled here at root, F77 is in f77/util, and F90 in F90/util) -if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") -else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") -endif() +set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/") diff --git a/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt b/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt index 19391f7c4c..acdfd5d0d6 100644 --- a/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/attr/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/coll/CMakeLists.txt b/teshsuite/smpi/mpich3-test/coll/CMakeLists.txt index 2fa2e68284..6c4a1a75a3 100644 --- a/teshsuite/smpi/mpich3-test/coll/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/coll/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") # There are too many warnings with these programs set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-compare") diff --git a/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt b/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt index 4c2657ab9f..4bed718a43 100644 --- a/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/comm/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt b/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt index 1f1bd33442..b9d31e5940 100644 --- a/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/errhan/CMakeLists.txt b/teshsuite/smpi/mpich3-test/errhan/CMakeLists.txt index 1a7cff1466..e941496512 100644 --- a/teshsuite/smpi/mpich3-test/errhan/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/errhan/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt index c6464fe2d2..fee3ec3c7e 100644 --- a/teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f77/coll/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/coll/CMakeLists.txt index 632148848d..30bbd89096 100644 --- a/teshsuite/smpi/mpich3-test/f77/coll/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/coll/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f77/comm/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/comm/CMakeLists.txt index 44b8e3ed16..d28313a674 100644 --- a/teshsuite/smpi/mpich3-test/f77/comm/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/comm/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f77/datatype/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/datatype/CMakeLists.txt index 2c55fa3175..4c550312be 100644 --- a/teshsuite/smpi/mpich3-test/f77/datatype/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/datatype/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/teshsuite/smpi/mpich3-test/f77/ext/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/ext/CMakeLists.txt index 3eee5c8f38..9ac4ac9265 100644 --- a/teshsuite/smpi/mpich3-test/f77/ext/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/ext/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../include/") diff --git a/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt index e1b635fd98..4aac50dc9d 100644 --- a/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f77/init/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/init/CMakeLists.txt index 6e51d8d969..2a3e74fec7 100644 --- a/teshsuite/smpi/mpich3-test/f77/init/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/init/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt index 0fa67d5f65..f6f088d625 100644 --- a/teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt index 6b659ce865..1daf583849 100644 --- a/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f77/topo/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/topo/CMakeLists.txt index 19223a34a8..f8964a5ec8 100644 --- a/teshsuite/smpi/mpich3-test/f77/topo/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/topo/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f77/util/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/util/CMakeLists.txt index 1387e60ec5..e88db7ea9c 100644 --- a/teshsuite/smpi/mpich3-test/f77/util/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/util/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt index b051d25598..1dc21fe9e9 100644 --- a/teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt index bd31a74664..e80c5145df 100644 --- a/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt index 00d809c13a..b4fb632973 100644 --- a/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f90/init/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/init/CMakeLists.txt index cd3e8f32ed..3ce5a7cdb5 100644 --- a/teshsuite/smpi/mpich3-test/f90/init/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/init/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt index 89bcd81309..4ad7bd8148 100644 --- a/teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt index 8e004aff34..48f19fcee9 100644 --- a/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/f90/util/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/util/CMakeLists.txt index 6f38ae4c5c..e2f0a9bcba 100644 --- a/teshsuite/smpi/mpich3-test/f90/util/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f90/util/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/group/CMakeLists.txt b/teshsuite/smpi/mpich3-test/group/CMakeLists.txt index 69d64625a8..2f3cb24f7f 100644 --- a/teshsuite/smpi/mpich3-test/group/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/group/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/info/CMakeLists.txt b/teshsuite/smpi/mpich3-test/info/CMakeLists.txt index dcca724d2b..4d6d572ebd 100644 --- a/teshsuite/smpi/mpich3-test/info/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/info/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/init/CMakeLists.txt b/teshsuite/smpi/mpich3-test/init/CMakeLists.txt index 973df2ff3f..4a8a6e8c8d 100644 --- a/teshsuite/smpi/mpich3-test/init/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/init/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/io/CMakeLists.txt b/teshsuite/smpi/mpich3-test/io/CMakeLists.txt index cfde8723c6..643b4ab4d8 100644 --- a/teshsuite/smpi/mpich3-test/io/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/io/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/perf/CMakeLists.txt b/teshsuite/smpi/mpich3-test/perf/CMakeLists.txt index fffa73f3d3..c57bc7baf2 100644 --- a/teshsuite/smpi/mpich3-test/perf/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/perf/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt b/teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt index 955ab60af1..8a8431ac31 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt b/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt index 088f9abdb7..9115003bfc 100644 --- a/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/rma/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") set(MPICH_FLAGS "-DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1 -Wno-error=unused-variable") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") diff --git a/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt b/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt index 8b2da74f7f..671fbcd141 100644 --- a/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/topo/CMakeLists.txt @@ -1,10 +1,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite) - if(WIN32) - set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h") - else() - set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") - set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") - endif() + set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc") + set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff") include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/") diff --git a/tools/cmake/Flags.cmake b/tools/cmake/Flags.cmake index 636365c05e..da04a8a4f8 100644 --- a/tools/cmake/Flags.cmake +++ b/tools/cmake/Flags.cmake @@ -288,27 +288,3 @@ if(NOT $ENV{LDFLAGS} STREQUAL "") message(STATUS "Add LDFLAGS: \"$ENV{LDFLAGS}\" to CMAKE_C_LINK_FLAGS") set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} $ENV{LDFLAGS}") endif() - -if(MINGW) - # http://stackoverflow.com/questions/10452262/create-64-bit-jni-under-windows - # We don't want to ship libgcc_s_seh-1.dll nor libstdc++-6.dll - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") - set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static-libgcc") - set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static-libgcc -static-libstdc++") - - # JNI searches for stdcalls - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--add-stdcall-alias") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--add-stdcall-alias") - set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -Wl,--add-stdcall-alias") - set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -Wl,--add-stdcall-alias") - - # Specify the data model that we are using (yeah it may help Java) - if(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32 bits - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") - else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") - endif() -endif() diff --git a/tools/cmake/Java.cmake b/tools/cmake/Java.cmake index 72813dcca3..d9b2bb1140 100644 --- a/tools/cmake/Java.cmake +++ b/tools/cmake/Java.cmake @@ -14,14 +14,6 @@ find_package(JNI REQUIRED) message(STATUS "[Java] JNI found: ${JNI_FOUND}") message(STATUS "[Java] JNI include dirs: ${JNI_INCLUDE_DIRS}") -if(WIN32) - execute_process(COMMAND java -d64 -version - OUTPUT_VARIABLE JVM_IS_64_BITS) - if("${JVM_IS_64_BITS}" MATCHES "Error") - message(fatal_error "SimGrid can only use Java 64 bits") - endif() -endif() - # Rules to build libsimgrid-java ################################ @@ -122,21 +114,6 @@ if(enable_lib_in_jar) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/lib/${LIBSIMGRID_JAVA_SO} ${JAVA_NATIVE_PATH}/${LIBSIMGRID_JAVA_SO} ) -if(WIN32) - add_custom_command( - TARGET simgrid-java_jar POST_BUILD - COMMENT "Add the windows-specific native libs into simgrid.jar..." - DEPENDS simgrid simgrid-java ${JAVALIBS} - - # There is no way to disable the dependency of mingw-64 on that lib, unfortunately nor to script cmake -E properly - # So let's be brutal and copy it in any case (even on non-windows builds) from the location where appveyor provides it. - # The copy is only expected to work on the appveyor builder, but that's all we need right now - # since our users are directed to download that file as nightly build. - COMMAND ${CMAKE_COMMAND} -E copy_if_different C:/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/libwinpthread-1.dll ${JAVA_NATIVE_PATH}/libwinpthread-1.dll || true - COMMAND ${CMAKE_COMMAND} -E copy_if_different C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/libwinpthread-1.dll ${JAVA_NATIVE_PATH}/libwinpthread-1.dll || true - ) -endif() - if(APPLE) add_custom_command( TARGET simgrid-java_jar POST_BUILD diff --git a/tools/cmake/MaintainerMode.cmake b/tools/cmake/MaintainerMode.cmake index a2ab5449e7..6875eab197 100644 --- a/tools/cmake/MaintainerMode.cmake +++ b/tools/cmake/MaintainerMode.cmake @@ -10,7 +10,7 @@ set(FLEX_MIN_PATCH 39) # Let's generate header files required by SMPI when the call location tracing # has been activated. -if(enable_maintainer_mode AND NOT WIN32) +if(enable_maintainer_mode) add_custom_command(OUTPUT ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces.h ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_extended_traces_fortran.h DEPENDS @@ -35,7 +35,7 @@ if(enable_maintainer_mode AND NOT WIN32) ) endif() -if(enable_maintainer_mode AND NOT WIN32) +if(enable_maintainer_mode) find_program(FLEX_EXE NAMES flex) find_program(FLEXML_EXE NAMES flexml) find_program(SED_EXE NAMES sed) diff --git a/tools/cmake/MakeLibWin.cmake b/tools/cmake/MakeLibWin.cmake deleted file mode 100644 index d76e274957..0000000000 --- a/tools/cmake/MakeLibWin.cmake +++ /dev/null @@ -1,36 +0,0 @@ -### Make Libs - -add_library(simgrid SHARED ${simgrid_sources}) - -if(MSVC) - set_target_properties(simgrid PROPERTIES - COMPILE_FLAGS "/DDLL_EXPORT" - VERSION ${libsimgrid_version} ) -else() - set_target_properties(simgrid PROPERTIES - COMPILE_FLAGS "-DDLL_EXPORT" - LINK_FLAGS "-shared" - VERSION ${libsimgrid_version} - PREFIX "lib" SUFFIX ".dll" - IMPORT_PREFIX "lib" IMPORT_SUFFIX ".dll") - - set(SIMGRID_DEP "-lm") - - if (HAVE_BOOST_CONTEXTS) - target_link_libraries(simgrid ${Boost_CONTEXT_LIBRARY}) - endif() - - if (HAVE_BOOST_STACKTRACE_BACKTRACE) - target_link_libraries(simgrid ${Boost_STACKTRACE_BACKTRACE_LIBRARY}) - endif() - - if (HAVE_BOOST_ADDR2LINE_BACKTRACE) - target_link_libraries(simgrid ${Boost_STACKTRACE_ADDR2LINE_LIBRARY}) - endif() -endif() - -target_link_libraries(simgrid ${SIMGRID_DEP}) - -# The library can obviously use the internal headers -set_property(TARGET simgrid - APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}") diff --git a/tools/cmake/Option.cmake b/tools/cmake/Option.cmake index b165f3575a..b3ed2f3321 100644 --- a/tools/cmake/Option.cmake +++ b/tools/cmake/Option.cmake @@ -39,14 +39,8 @@ if(enable-model-checking) SET(enable_model-checking ON CACHE BOOL "Whether to compile the model-checker" FORCE) endif() -if(WIN32) - option(enable_smpi "Whether SMPI is included in the library." off) -else() - option(enable_smpi "Whether SMPI is included in the library." on) - # PAPI does not support windows (they did in 3.7, but not anymore in 5.x) - # See http://icl.cs.utk.edu/papi/custom/index.html?lid=62&slid=96 - option(enable_smpi_papi "Whether SMPI supports PAPI bindings." off) -endif() +option(enable_smpi "Whether SMPI is included in the library." on) +option(enable_smpi_papi "Whether SMPI supports PAPI bindings." off) option(enable_smpi_MPICH3_testsuite "Whether the test suite form MPICH 3 should be built" off) option(enable_smpi_MBI_testsuite "Whether the test suite from MBI should be built." off) diff --git a/tools/cmake/Tests.cmake b/tools/cmake/Tests.cmake index 4ded9f1cd9..aa6cf4681e 100644 --- a/tools/cmake/Tests.cmake +++ b/tools/cmake/Tests.cmake @@ -40,9 +40,6 @@ ENDIF() MACRO(ADD_TESH NAME) SET(ARGT ${ARGV}) LIST(REMOVE_AT ARGT 0) - IF(WIN32) - STRING(REPLACE "§" "\;" ARGT "${ARGT}") - ENDIF() if(VALGRIND_WRAPPER) ADD_TEST(${NAME} ${TESH_COMMAND} --wrapper "${VALGRIND_WRAPPER}" ${TESH_OPTION} ${ARGT}) else() @@ -113,11 +110,7 @@ MACRO(SET_TESH_PROPERTIES NAME FACTORIES) ENDMACRO() IF(enable_java) - IF(WIN32) - SET(TESH_CLASSPATH_SEPARATOR "§") - ELSE() - SET(TESH_CLASSPATH_SEPARATOR ":") - ENDIF() + SET(TESH_CLASSPATH_SEPARATOR ":") SET(TESH_CLASSPATH "${CMAKE_BINARY_DIR}/examples/deprecated/java/${TESH_CLASSPATH_SEPARATOR}${CMAKE_BINARY_DIR}/teshsuite/java/${TESH_CLASSPATH_SEPARATOR}${SIMGRID_JAR}") ENDIF() diff --git a/tools/tesh/CMakeLists.txt b/tools/tesh/CMakeLists.txt index 77e6bf9cb6..eb1caded82 100644 --- a/tools/tesh/CMakeLists.txt +++ b/tools/tesh/CMakeLists.txt @@ -6,7 +6,7 @@ foreach(x setenv set-output-ignore set-output-sort set-return set-timeout backgr catch-all-bg-output catch-return catch-signal catch-timeout catch-timeout-output catch-wrong-output cd color ignore-regexp IO-bigsize IO-broken-pipe IO-orders) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.tesh) - if(NOT enable_memcheck AND NOT WIN32) + if(NOT enable_memcheck) ADD_TESH(tesh-self-${x} --setenv bindir=${CMAKE_BINARY_DIR}/bin ${CMAKE_HOME_DIRECTORY}/tools/tesh/${x}.tesh) endif() endforeach()