omnetpp / cmake

CMake module for OMNeT++ projects
GNU General Public License v2.0
8 stars 5 forks source link

Enabling CMake OMNeT++ on Windows #1

Closed HpLightcorner closed 3 years ago

HpLightcorner commented 3 years ago

This PR enables OMNeT++ CMake to be used on Windows. Also, some changes are applied to allow to work with OMNeT++ Version 6 (changing e.g. how messages are generated by copying the message description before generating code).

A CMake feature used to correctly work with Windows paths bumps the minimum CMake version to 3.20 - this may need further discussion.

riebl commented 3 years ago

I had to add WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} to the copy step in generate_opp_message to not receive a copying error. Edit: Hold on, there seems to be more broken right now…

HpLightcorner commented 3 years ago

I for sure highly focused on version 6.x - so might be that I have overseen some features needed for the 5.x builds with the message generator.

riebl commented 3 years ago

Seems to run fine again with my fixup commit. Vice versa, I hope it does not break your 6.x setup. Adding -I ${msg_dir} seems to be unnecessary and even breaks if ${msg_dir} is empty.

HpLightcorner commented 3 years ago

Of course, it's broken now XD Let me find out what's missing...

EDIT: Nevermind, there were some test stubs in the CMake Code causing the error. It still works fine with 6.x and Windows :)

When we proceed with my suggestion for Artery, I will then also test 5.x on windows, but I think there won't be show stoppers.

thor commented 3 years ago

I'm a bit preoccupied at the moment with a funeral, but 1) I'll test it relatively early next week, 2) feel free to merge this without waiting for my review, before I get around to testing my setup if you'd like, and then I'll 3) create issues for what comes around.

HpLightcorner commented 3 years ago

@riebl - can you check if changing from cmake_path to file is working with your CMake version?

riebl commented 3 years ago

@HpLightcorner I have checked it with CMake 3.13.5 and it builds fine.

HpLightcorner commented 3 years ago

@riebl and @thor - I guess we are ready to merge into develop and start with short-lived feature branches!