Commit e252865e authored by Benoit Barbot's avatar Benoit Barbot

clean warning + small bugfix

parent 5325a5b7
Pipeline #1057 passed with stages
in 13 minutes and 54 seconds
......@@ -24,7 +24,7 @@ ADD_DEFINITIONS(
-DGIT_REVISION=\"${GIT_REVISION}\"
-DBOOST_PATH=\"-I${Boost_INCLUDE_DIRS}\"
-DBOOST_LIB=\"${Boost_LIBRARIES}\"
-DCPP_COMPILER=\"${CMAKE_CXX_COMPILER}\"
-DCPP_COMPILER=\"g++\"
-DCMAKE_VERSION=\"${CMAKE_VERSION}\"
)
......@@ -44,10 +44,13 @@ add_library(libeval
${FLEX_EvalScanner_OUTPUTS}
src/ModelGenerator/Eval/Eval.cpp)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(libeval PRIVATE -Wno-unneeded-internal-declaration)
endif()
target_include_directories(libeval PRIVATE "src/ModelGenerator/Eval")
target_include_directories(libeval PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/src/ModelGenerator/Eval)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/src/ModelGenerator/GspnParser/")
BISON_TARGET(GrmlParser src/ModelGenerator/GspnParser/Gspn-parser.yy
${CMAKE_CURRENT_BINARY_DIR}/src/ModelGenerator/GspnParser/Gspn-parser.cc COMPILE_FLAGS -pgspn)
......@@ -65,7 +68,11 @@ src/ModelGenerator/GspnParser/Gspn-Reader.cpp
src/ModelGenerator/GspnParser/Gspn-Writer.cpp
src/ModelGenerator/GspnParser/Gspn_gmlparser.cpp
)
target_compile_options(libgspn PRIVATE -Wno-format-truncation)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(libgspn PRIVATE -Wno-format-truncation)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(libgspn PRIVATE -Wno-unneeded-internal-declaration)
endif()
target_link_libraries (libgspn grml libeval)
target_include_directories(libgspn PUBLIC "src/libgrml")
target_include_directories(libgspn PRIVATE "src/ModelGenerator/GspnParser")
......@@ -83,7 +90,11 @@ add_library(liblha
src/ModelGenerator/LhaParser/Lha-Reader.cpp
src/ModelGenerator/LhaParser/Lha_gmlparser.cpp
)
target_compile_options(liblha PRIVATE -Wno-format-truncation)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(liblha PRIVATE -Wno-format-truncation)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(liblha PRIVATE -Wno-unneeded-internal-declaration)
endif()
target_include_directories(liblha PRIVATE "src/ModelGenerator/LhaParser")
target_include_directories(liblha PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src/ModelGenerator/LhaParser)
target_link_libraries(liblha libeval libgspn)
......@@ -115,9 +126,7 @@ add_library(ClientSimBase
src/Simulator/Event.cpp
src/Simulator/EventsQueue.cpp
src/Simulator/timeGen.cpp
src/Simulator/LHA_orig.cpp
src/Simulator/clientsim.cpp
src/Simulator/Simulator.cpp
)
target_include_directories(ClientSimBase PRIVATE "src/ModelGenerator")
......@@ -132,14 +141,11 @@ install(TARGETS ClientSimMain DESTINATION lib)
add_library(ClientSim
src/Simulator/timeGenBis.cpp
src/Simulator/EventsQueueSet.cpp
src/Simulator/SPNBase.cpp
src/Simulator/NLHA.cpp
src/Simulator/RareEvents/SimulatorRE.cpp
src/Simulator/stateSpace.cpp
src/Simulator/RareEvents/numericalSolver.cpp
src/Simulator/RareEvents/numSolverBB.cpp
src/Simulator/RareEvents/numSolverSH.cpp
src/Simulator/RareEvents/SimulatorBoundedRE.cpp
src/Simulator/RareEvents/foxglynn.cpp
src/Simulator/RareEvents/SimulatorContinuousBounded.cpp
src/Simulator/Simulink/SKTime.cpp
......@@ -191,7 +197,10 @@ SOURCES ${ml_SOURCES}
)
add_executable(testClientSim ${CMAKE_CURRENT_BINARY_DIR}/tmp/spn.cpp ${CMAKE_CURRENT_BINARY_DIR}/tmp/LHA.cpp)
target_compile_options(testClientSim PRIVATE -Wno-return-type -Wno-unused-variable -Wno-unused-but-set-variable)
target_compile_options(testClientSim PRIVATE -Wno-return-type -Wno-unused-variable)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(testClientSim PRIVATE -Wno-unused-but-set-variable)
endif()
include_directories("src/Simulator")
add_dependencies(testClientSim Cosmos)
target_link_libraries (testClientSim ClientSimMain ClientSimBase)
......
......@@ -6,13 +6,14 @@ if Array.length Sys.argv >1 then
#use "testTeamCity.ml";;
print_endline ("Cosmos Path set to:"^ (!cosmos_path));;
let log = (Unix.getcwd ())^"/cosmos_test_log";;
init_log log;;
Sys.command ("TandemQN/" ^ !cosmos_path ^" --version");;
let benchlist = [
"TandemQN", None;
"pi",None;
......@@ -49,19 +50,3 @@ if List.length failure >0 then (
List.iter print_endline failure
)
(*
(cd TandemQN && ocaml test.ml $(INTC))
(cd pi && ocaml test.ml $(INTC))
(cd testDistribution && ocaml test.ml $(INTC))
(cd Workflow-Net && ocaml test.ml $(INTC))
(cd QueueMM1 && ocaml test.ml $(INTC))
(cd signallingCascade && ocaml test.ml $(INTC))
(cd DataBase && ocaml test.ml $(INTC))
(cd RareEventUnbounded && ocaml test.ml $(INTC))
# (cd RareEventUnbounded && ocaml test2.ml $(INTC))
# (cd TandemCosy && ocaml testPrism.ml $(INTC))
(cd SharedMemory && ocaml test.ml $(INTC))
(cd RareEventU && ocaml test.ml $(INTC))
(cd DNAWalker && ocaml test.ml $(INTC))
*)
......@@ -29,8 +29,6 @@
using namespace std;
template<class S, class EQT>
const vector<size_t> SPNBase<S, EQT>::getNbTransition()const {
auto nbtrans = vector<size_t>();
......
......@@ -27,7 +27,7 @@ ExpatModelParser::~ExpatModelParser()
XML_ParserFree(parser);
}
void ExpatModelParser::parse_file(const std::string& filename) throw()
void ExpatModelParser::parse_file(const std::string& filename)
{
std::ifstream ifs(filename.c_str());
if (ifs.fail()) {
......@@ -36,7 +36,7 @@ void ExpatModelParser::parse_file(const std::string& filename) throw()
parse_stream(ifs);
}
void ExpatModelParser::parse_stream(std::istream& in) throw()
void ExpatModelParser::parse_stream(std::istream& in)
{
XML_Status status;
while(in.good())
......
......@@ -81,13 +81,13 @@ public:
* Parse a file.
* @param filename path to the file
*/
void parse_file(const std::string& filename) throw();
void parse_file(const std::string& filename);
/**
* Parse from an input stream
* @param in input stream
*/
void parse_stream(std::istream& in) throw();
void parse_stream(std::istream& in);
/**
* Trim a string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment