cogged include/internal/bottles.hpp
This commit is contained in:
parent
d8760c321a
commit
6943ebfd87
@ -40,7 +40,7 @@ foreach(cogfile ${cogfiles})
|
|||||||
string(REGEX REPLACE ".cog\$" "" outfile "${cogfile}")
|
string(REGEX REPLACE ".cog\$" "" outfile "${cogfile}")
|
||||||
set(thisfile "${CMAKE_CURRENT_SOURCE_DIR}/${outfile}")
|
set(thisfile "${CMAKE_CURRENT_SOURCE_DIR}/${outfile}")
|
||||||
|
|
||||||
add_custom_command(OUTPUT "${thisfile}"
|
add_custom_command(OUTPUT "${thisfile}" PRE_BUILD
|
||||||
COMMAND ${PYTHON_EXECUTABLE} -m cogapp -d -o "${outfile}" "${cogfile}"
|
COMMAND ${PYTHON_EXECUTABLE} -m cogapp -d -o "${outfile}" "${cogfile}"
|
||||||
DEPENDS ${cogfile}
|
DEPENDS ${cogfile}
|
||||||
COMMENT "Greasing the cog for ${thisfile}")
|
COMMENT "Greasing the cog for ${thisfile}")
|
||||||
@ -50,6 +50,7 @@ endforeach(cogfile)
|
|||||||
|
|
||||||
add_library(bottles SHARED ${src}/bottles/bottles.cpp
|
add_library(bottles SHARED ${src}/bottles/bottles.cpp
|
||||||
${src}/bottles/active.cpp ${src}/bottles/commands.cpp)
|
${src}/bottles/active.cpp ${src}/bottles/commands.cpp)
|
||||||
|
add_dependencies(bottles cog)
|
||||||
|
|
||||||
add_custom_target(cog ALL DEPENDS ${coggedfiles})
|
add_custom_target(cog ALL DEPENDS ${coggedfiles})
|
||||||
|
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
#ifndef __INTERNAL_BOTTLES_HPP
|
|
||||||
#define __INTERNAL_BOTTLES_HPP
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
namespace cellar {
|
|
||||||
namespace bottles {
|
|
||||||
extern void print_bottles(int,char**);
|
|
||||||
extern void print_active_bottle(int,char**);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // __INTERNAL_BOTTLES_HPP
|
|
20
include/internal/bottles.hpp.cog
Normal file
20
include/internal/bottles.hpp.cog
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// vim: filetype=cpp :
|
||||||
|
#ifndef __INTERNAL_BOTTLES_HPP
|
||||||
|
#define __INTERNAL_BOTTLES_HPP
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace cellar {
|
||||||
|
namespace bottles {
|
||||||
|
/*[[[cog
|
||||||
|
import cog
|
||||||
|
|
||||||
|
with open("src/bottles/commands.txt") as commandsfile:
|
||||||
|
for line in commandsfile:
|
||||||
|
item = line.split(" ")
|
||||||
|
cog.outl("extern void {0} (int, char**);".format(item[1]))
|
||||||
|
]]]*/
|
||||||
|
//[[[end]]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __INTERNAL_BOTTLES_HPP
|
Loading…
Reference in New Issue
Block a user