Skip to content
Snippets Groups Projects
Commit 621d2941 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix mingw build

parent 31be7295
No related branches found
No related tags found
No related merge requests found
......@@ -117,6 +117,10 @@ else(APPLE)
set(GMSH_OS "${CMAKE_SYSTEM_NAME}")
endif(APPLE)
include(CheckTypeSize)
include(CheckFunctionExists)
include(CheckIncludeFile)
if(MSVC)
# remove really annoying (and stupid, and wrong) warning about
# bool/int cast performance in Visual C++
......@@ -162,7 +166,6 @@ endmacro(find_all_libraries)
# check if the machine is 64 bits (this is more reliable than using
# CMAKE_SIZEOF_VOID_P, which does not seem to work e.g. on some Suse
# machines)
include(CheckTypeSize)
check_type_size("void*" SIZEOF_VOID_P)
if(SIZEOF_VOID_P EQUAL 8)
set(HAVE_64BIT_SIZE_T TRUE)
......@@ -709,19 +712,17 @@ if(HAVE_LUA AND ENABLE_READLINE)
endif(READLINE_LIB)
endif(HAVE_LUA AND ENABLE_READLINE)
include(CheckFunctionExists)
check_function_exists(vsnprintf HAVE_VSNPRINTF)
if(NOT HAVE_VSNPRINTF)
set(HAVE_NO_VSNPRINTF TRUE)
list(APPEND CONFIG_OPTIONS "NoVsnprintf")
endif(NOT HAVE_VSNPRINTF)
include(CheckIncludeFile)
check_include_file(sys/socket.h HAVE_SYS_SOCKET_H)
if(HAVE_SYS_SOCKET_H)
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
endif(HAVE_SYS_SOCKET_H)
include(CheckTypeSize)
check_type_size(socklen_t SOCKLEN_T_SIZE)
if(NOT SOCKLEN_T_SIZE)
set(HAVE_NO_SOCKLEN_T TRUE)
......@@ -729,6 +730,13 @@ if(NOT SOCKLEN_T_SIZE)
endif(NOT SOCKLEN_T_SIZE)
set(CMAKE_EXTRA_INCLUDE_FILES)
check_include_file(dlfcn.h DLFCN_H)
if(DLFCN_H)
set(HAVE_DLOPEN true)
list(APPEND CONFIG_OPTIONS "Dlopen")
list(APPEND EXTERNAL_LIBRARIES ${CMAKE_DL_LIB})
endif(DLFCN_H)
if(UNIX)
# do not optimize some files on Unix
file(GLOB_RECURSE NON_OPTIMIZED_SRC Common/GmshPredicates.cpp Mesh/BDS.cpp
......@@ -736,12 +744,6 @@ if(UNIX)
set_source_files_properties(${NON_OPTIMIZED_SRC} COMPILE_FLAGS "-O0")
endif(UNIX)
if(UNIX)
#DLOpen
set(HAVE_DLOPEN true)
list(APPEND EXTERNAL_LIBRARIES ${CMAKE_DL_LIB})
endif(UNIX)
if(MSVC)
add_definitions(-D_USE_MATH_DEFINES -DNOMINMAX
-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
......
......@@ -243,7 +243,7 @@ class historyChooser{
: _prefix(prefix), _label(label), _commandLabel(commandLabel),
_defaultCommand(defaultCommand), _okLabel(okLabel)
{
int x = 100, y = 100, h = 4 * WB + 10 * BH, w = 3 * BB + 2 * WB;
int h = 4 * WB + 10 * BH, w = 3 * BB + 2 * WB;
window = new Fl_Double_Window(w, h);
window->set_modal();
window->label(_label.c_str());
......
......@@ -64,7 +64,7 @@ g:set(1,0,0)
g:set(2,0,-1.)
g:set(3,0,0)
law:setSource(functionConstant(g):getName())
--law:setSource(functionConstant(g):getName())
law:addBoundaryCondition('Walls',law:newSlipWallBoundary())
FS = functionLua(4, 'initial_condition', {'XYZ'}):getName()
law:addBoundaryCondition('Top',law:newOutsideValueBoundary(FS))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment