Skip to content

Commit adb1491

Browse files
committedMar 2, 2020
Should compile again with appveyor
1 parent 7b73fdd commit adb1491

File tree

11 files changed

+41
-27
lines changed

11 files changed

+41
-27
lines changed
 

‎SetCompilerFlags.cmake

+10-1
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
4646
CHECK_CXX_COMPILER_FLAG(-std=c++0x HAVE_STDCPP0X)
4747
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STDCPP11)
4848
CHECK_CXX_COMPILER_FLAG(-std=c++14 HAVE_STDCPP14)
49+
CHECK_CXX_COMPILER_FLAG(-std=c++17 HAVE_STDCPP17)
4950
CHECK_CXX_COMPILER_FLAG(-fsanitize=undefined HAVE_SANITIZE_UNDEFINED)
5051
CHECK_CXX_COMPILER_FLAG(-fno-omit-frame-pointer HAVE_NO_OMIT_FRAME_POINTER)
5152
if (HAVE_NO_OMIT_FRAME_POINTER)
5253
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")
5354
endif()
5455

55-
if (HAVE_STDCPP14)
56+
if (HAVE_STDCPP17)
57+
message("C++17 supported ")
58+
set(CMAKE_CXX_STANDARD 17)
59+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
60+
set(CMAKE_CXX_EXTENSIONS OFF)
61+
elseif (HAVE_STDCPP14)
5662
message("C++14 supported ")
5763
set(CMAKE_CXX_STANDARD 14)
5864
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -115,6 +121,9 @@ if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
115121
set(LIB_INSTALL_DIR "lib")
116122
else ()
117123
message("Windows flags")
124+
set(CMAKE_CXX_STANDARD 17)
125+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
126+
set(CMAKE_CXX_EXTENSIONS OFF)
118127
add_definitions(-D WIN32)
119128

120129
# By default, do not warn when built on machines using only VS Express:

‎appveyor.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ environment:
2727

2828
configuration: Release
2929

30-
os: Visual Studio 2015
30+
os: Visual Studio 2017
31+
#os: Visual Studio 2015
3132
#os: Visual Studio 2013
3233

3334
install:

‎lima_common/CMakeLists.txt

+2-11
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@
1717
project(limacommon)
1818
cmake_minimum_required(VERSION 3.4.0)
1919

20-
#cmake_policy
21-
if(POLICY CMP0020)
22-
cmake_policy(SET CMP0020 OLD)
23-
endif()
24-
25-
# Use these cmake parameters (adapt to your setup) to compile under Windows
26-
# -DCMAKE_INSTALL_PREFIX="c:/amose" -DCMAKE_BUILD_TYPE=Release
27-
# -DCMAKE_INSTALL_PREFIX="c:/amose-debug" -DCMAKE_BUILD_TYPE=RelWithDebInfo
28-
29-
set(CMAKE_USE_RELATIVE_PATHS OFF)
3020
enable_testing()
3121

3222
# include(${CMAKE_SOURCE_DIR}/../SystemSpecificInformations.cmake)
@@ -71,7 +61,8 @@ set( Boost_USE_STATIC_LIBS OFF )
7161
set( Boost_USE_MULTITHREADED ON )
7262
set( Boost_USE_STATIC_RUNTIME OFF )
7363
set( BOOST_LIB_DIAGNOSTIC )
74-
find_package(Boost 1.54 REQUIRED COMPONENTS unit_test_framework system filesystem)
64+
find_package(Boost 1.54 REQUIRED
65+
COMPONENTS unit_test_framework system filesystem)
7566
message("Boost_INCLUDE_DIR= ${Boost_INCLUDE_DIR}")
7667
include_directories(${Boost_INCLUDE_DIR})
7768
link_directories(${Boost_LIBRARY_DIRS})

‎lima_common/conf/log4cpp.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ log4j.category.Automaton::Compiler=ERROR
8181

8282
#Appenders
8383
log4j.appender.DebugOutput=
84-
#log4j.appender.File=<absolute or relative path to a file>
84+
log4j.appender.File=/c/b/log.txt
8585

‎lima_common/src/common/tools/CMakeLists.txt

+8-10
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,20 @@ SET(lima-common-tools_LIB_SRCS
3939
FileUtils.cpp
4040
)
4141

42-
if (NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
43-
SET(lima-common-tools_LIB_SRCS
44-
${lima-common-tools_LIB_SRCS}
45-
)
46-
47-
endif()
48-
add_library(lima-common-tools SHARED ${lima-common-tools_LIB_SRCS} ${lima-common-tools_MOC_OUTFILES})
42+
add_library(lima-common-tools SHARED ${lima-common-tools_LIB_SRCS})
4943
ADD_DLL_TO_PATH(lima-common-tools)
5044

5145
target_link_libraries(lima-common-tools
5246
Qt5::Core
5347
)
5448

55-
set_target_properties(lima-common-tools PROPERTIES VERSION ${LIMA_COMMON_LIB_VERSION} SOVERSION ${LIMA_COMMON_LIB_SOVERSION})
56-
install(TARGETS lima-common-tools DESTINATION ${LIB_INSTALL_DIR}
57-
COMPONENT runtime)
49+
set_target_properties(lima-common-tools PROPERTIES
50+
VERSION ${LIMA_COMMON_LIB_VERSION}
51+
SOVERSION ${LIMA_COMMON_LIB_SOVERSION})
52+
53+
install(TARGETS lima-common-tools
54+
DESTINATION ${LIB_INSTALL_DIR}
55+
COMPONENT runtime)
5856

5957
add_subdirectory(tests)
6058

‎lima_common/src/common/tools/tests/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ add_executable(LimaFileSystemWatcherTest0
1515

1616
target_link_libraries(LimaFileSystemWatcherTest0
1717
lima-common-factory
18+
lima-common-tools
1819
Qt5::Test
1920
)
2021

‎lima_linguisticprocessing/tools/automatonCompiler/compile-rules.cpp

+10-3
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,22 @@ int run(int argc, char** argv)
299299

300300
if (QsLogging::initQsLog(configPath) != 0)
301301
{
302-
LOGINIT("Automaton::Compiler");
303-
LERROR << "Call to QsLogging::initQsLog(\"" << configPath << "\") failed.";
302+
std::cerr << "Call to QsLogging::initQsLog(\"" << configPath.toStdString()
303+
<< "\") failed.";
304304
return EXIT_FAILURE;
305305
}
306-
306+
std::cerr << "compile_rules before Lima::AmosePluginsManager::single";
307307
// Necessary to initialize factories
308308
Lima::AmosePluginsManager::single();
309309
// Lima::AmosePluginsManiager::changeable().loadPlugins(configPath);
310+
std::cerr << "compile_rules before loadPlugins";
310311
if (!Lima::AmosePluginsManager::changeable().loadPlugins(configPath))
311312
{
312313
LOGINIT("Automaton::Compiler");
313314
LERROR << "compile-rules: Call to loadPlugins(\""
314315
<< configPath << "\") failed.";
316+
std::cerr << "compile-rules: Call to loadPlugins(\""
317+
<< configPath.toStdString() << "\") failed.";
315318
return EXIT_FAILURE;
316319
}
317320

@@ -325,6 +328,7 @@ int run(int argc, char** argv)
325328
LOGINIT("Automaton::Compiler");
326329
LDEBUG << "main: MediaticData::changeable().init( "
327330
<< param.resourcesDir << ")...";
331+
std::cerr << "compile_rules before MediaticData::changeable().init";
328332
MediaticData::changeable().init(
329333
resourcesPath.toUtf8().constData(),
330334
configPath.toUtf8().constData(),
@@ -374,6 +378,9 @@ int run(int argc, char** argv)
374378
LOGINIT("Automaton::Compiler");
375379
LERROR << "No language was configured configured with" << configDirs
376380
<< "and" << param.lpConfigFile.c_str();
381+
std::cerr << "No language was configured configured with"
382+
<< configDirs.join(":").toStdString()
383+
<< "and" << param.lpConfigFile;
377384
return EXIT_FAILURE;
378385
}
379386

‎lima_linguisticprocessing/tools/automatonCompiler/libautomatonCompiler/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ADD_DLL_TO_PATH(lima-lp-automatoncompiler)
4040
target_link_libraries(lima-lp-automatoncompiler
4141
lima-lp-automaton
4242
lima-lp-analysisdict
43+
lima-xp-core
4344
)
4445

4546
set_target_properties(lima-lp-automatoncompiler PROPERTIES VERSION ${LIMA_LP_LIB_VERSION} SOVERSION ${LIMA_LP_LIB_SOVERSION})

‎lima_pelf/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ ENDIF(SVMTOOL++_FOUND)
7474
# include(${CMAKE_SOURCE_DIR}/../manageQt5.cmake)
7575
set(CMAKE_INCLUDE_CURRENT_DIR ON)
7676
set(CMAKE_AUTOMOC ON)
77+
set(CMAKE_AUTORCC ON)
78+
set(CMAKE_AUTOUIC ON)
7779
addQt5Modules(Core Xml XmlPatterns Gui Widgets)
7880

7981
# include_directories(${Qt5_INCLUDES})

‎lima_pelf/resourceTool/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ set(pelf-resedit_UIS
3131
# Wrap Qt UIs
3232
qt5_wrap_ui(pelf-resedit_UIS_H ${pelf-resedit_UIS})
3333
set(CMAKE_AUTOMOC ON)
34+
set(CMAKE_AUTORCC ON)
35+
set(CMAKE_AUTOUIC ON)
3436

3537
# Compile, link and install main exec
3638
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

‎manageQt5.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ endif()
3232

3333
set(CMAKE_INCLUDE_CURRENT_DIR ON)
3434
set(CMAKE_AUTOMOC ON)
35+
set(CMAKE_AUTORCC ON)
36+
set(CMAKE_AUTOUIC ON)
3537

3638
# This macro does the find_package with the required Qt5 modules listed as
3739
# parameters. Note that the Qt5_INCLUDES variable is not necessary anymore as

0 commit comments

Comments
 (0)
Please sign in to comment.